Browse Source

reorganize

master
Charles Reid 3 years ago
parent
commit
b546fa023a
  1. 40
      data_structures/Readme.md
  2. 0
      data_structures/arrays/CaesarCipher.py
  3. 0
      data_structures/arrays/DynamicArray.py
  4. 0
      data_structures/arrays/README.md
  5. 0
      data_structures/arrays/amortized-append-cost.py
  6. 0
      data_structures/arrays/arraytype.py
  7. 0
      data_structures/arrays/compute-sums.py
  8. 0
      data_structures/arrays/findfive.py
  9. 0
      data_structures/arrays/fisher-yates-shuffle.py
  10. 0
      data_structures/arrays/heuristic.py
  11. 0
      data_structures/arrays/img/listsize-longer.png
  12. 0
      data_structures/arrays/img/listsize-pop.png
  13. 0
      data_structures/arrays/img/listsize.png
  14. 0
      data_structures/arrays/listsize-exhausted.py
  15. 0
      data_structures/arrays/listsize-pop.py
  16. 0
      data_structures/arrays/listsize.py
  17. 0
      data_structures/arrays/plot-listsize-pop.py
  18. 0
      data_structures/arrays/plot-listsize.py
  19. 0
      data_structures/lists/linked-lists/.gitignore
  20. 0
      data_structures/lists/linked-lists/LinkedList.py
  21. 0
      data_structures/lists/linked-lists/README.md
  22. 0
      data_structures/stacks-queues-deques/deque/ArrayDeque.py
  23. 0
      data_structures/stacks-queues-deques/deque/queue_adapter.py
  24. 0
      data_structures/stacks-queues-deques/queues/ArrayQueue.py
  25. 0
      data_structures/stacks-queues-deques/stacks/ArrayStack.py
  26. 0
      data_structures/stacks-queues-deques/stacks/MatchDelimiters.py
  27. 0
      data_structures/stacks-queues-deques/stacks/ReverseOrder.py
  28. 16
      graph/Readme.md
  29. 14
      math/Readme.md
  30. 22
      math/pi_continued_fraction_convergents.py
  31. 7
      numbers/Readme.md
  32. 9
      search/Readme.md
  33. 9
      sequence/Readme.md
  34. 13
      sorts/Readme.md
  35. 6
      strings/Readme.md

40
data_structures/Readme.md

@ -0,0 +1,40 @@
Abstract data structure interfaces/types:
- heap
- list
- map
- queue
- set
- stack
- suffix tree
- tree
data structure implementations:
- avl tree
- b tree
- binary heap
- binary search tree
- compact suffix trie
- disjoint set
- fenwick tree
- graph
- hash array mapped trie
- hash map
- interval tree
- list
- matrix
- quad tree
- queue
- radixtrie
- red black tree
- segment tree
- skip list
- skip list map
- splay tree
- stack
- suffix tree
- suffix trie
- treap
- tree map
- trie
- trie map

0
arrays/CaesarCipher.py → data_structures/arrays/CaesarCipher.py

0
arrays/DynamicArray.py → data_structures/arrays/DynamicArray.py

0
arrays/README.md → data_structures/arrays/README.md

0
arrays/amortized-append-cost.py → data_structures/arrays/amortized-append-cost.py

0
arrays/arraytype.py → data_structures/arrays/arraytype.py

0
arrays/compute-sums.py → data_structures/arrays/compute-sums.py

0
arrays/findfive.py → data_structures/arrays/findfive.py

0
arrays/fisher-yates-shuffle.py → data_structures/arrays/fisher-yates-shuffle.py

0
arrays/heuristic.py → data_structures/arrays/heuristic.py

0
arrays/img/listsize-longer.png → data_structures/arrays/img/listsize-longer.png

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
arrays/img/listsize-pop.png → data_structures/arrays/img/listsize-pop.png

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

0
arrays/img/listsize.png → data_structures/arrays/img/listsize.png

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
arrays/listsize-exhausted.py → data_structures/arrays/listsize-exhausted.py

0
arrays/listsize-pop.py → data_structures/arrays/listsize-pop.py

0
arrays/listsize.py → data_structures/arrays/listsize.py

0
arrays/plot-listsize-pop.py → data_structures/arrays/plot-listsize-pop.py

0
arrays/plot-listsize.py → data_structures/arrays/plot-listsize.py

0
lists/linked-lists/.gitignore → data_structures/lists/linked-lists/.gitignore

0
lists/linked-lists/LinkedList.py → data_structures/lists/linked-lists/LinkedList.py

0
lists/linked-lists/README.md → data_structures/lists/linked-lists/README.md

0
stacks-queues-deques/deque/ArrayDeque.py → data_structures/stacks-queues-deques/deque/ArrayDeque.py

0
stacks-queues-deques/deque/queue_adapter.py → data_structures/stacks-queues-deques/deque/queue_adapter.py

0
stacks-queues-deques/queues/ArrayQueue.py → data_structures/stacks-queues-deques/queues/ArrayQueue.py

0
stacks-queues-deques/stacks/ArrayStack.py → data_structures/stacks-queues-deques/stacks/ArrayStack.py

0
stacks-queues-deques/stacks/MatchDelimiters.py → data_structures/stacks-queues-deques/stacks/MatchDelimiters.py

0
stacks-queues-deques/stacks/ReverseOrder.py → data_structures/stacks-queues-deques/stacks/ReverseOrder.py

16
graph/Readme.md

@ -0,0 +1,16 @@
graph algorithms:
- a star
- bellman ford
- bfs
- connected components
- cycle detection
- dfs
- dijkstra
- edmons karp
- floyd warshall
- johnson
- kruskal
- prim
- push relabel
- topological sort

14
math/Readme.md

@ -0,0 +1,14 @@
math functions:
- coprimes
- distance
- division
- exponentiation
- fast fourier transform
- gcd
- knapsack
- modular
- multiplication
- permutations
- primes
- ramer douglas peucker

22
math/pi_continued_fraction_convergents.py

@ -191,23 +191,7 @@ class Pi_Simple(SimpleContinuedFraction):
if __name__=="__main__":
print("%40s"%("4/Pi"))
print("-"*80)
for i in range(1,20):
print("%-40s\t%-20s\t%-20s"%(
FourOverPi_ContinuedFraction.str_convergent(i),
FourOverPi_ContinuedFraction.dec_convergent(i),
4.0/math.pi
))
print("\n\n")
print("%40s"%("Pi"))
print("%40s"%("Pi (pretty bad)"))
print("-"*80)
for i in range(1,24):
@ -223,7 +207,7 @@ if __name__=="__main__":
print("%40s"%("Pi Redux"))
print("%40s"%("Pi (a bit worse)"))
print("-"*80)
for i in range(1,24):
@ -237,7 +221,7 @@ if __name__=="__main__":
print("%40s"%("Pi Simple"))
print("%40s"%("Pi (simplest and best)"))
print("-"*80)
for i in range(1,14):
print("%-60s\t%-18s"%(

7
numbers/Readme.md

@ -0,0 +1,7 @@
numbers:
- complex numbers
- integer numbers
- longs
- numbers in different radix

9
search/Readme.md

@ -0,0 +1,9 @@
searching:
- binary search
- interpolation search
- linear search
- lower bound
- quick select
- upper bound

9
sequence/Readme.md

@ -0,0 +1,9 @@
sequences:
- arithmetic progression
- fibonacci sequence
- largest sum contiguous subarray
- longest common subsequence
- longest increasing subsequence
- longest palindromic subsequence
- subsequence counter

13
sorts/Readme.md

@ -0,0 +1,13 @@
sorting:
- dutch national flag/american flag sort
- bubble sort
- counting sort
- heap sort
- insertion sort
- merge sort
- quick sort
- radix sort
- shell sort

6
strings/Readme.md

@ -0,0 +1,6 @@
KnuthMorrisPratt.java
Manacher.java
Rotation.java
StringFunctions.java
Loading…
Cancel
Save