master-algorithms-py/sorting_and_searching
2023-07-16 17:35:14 -07:00
..
binary_search.py Add some cool queue, stacks, strings, math, bit manipulation examples (#35) 2023-07-16 17:35:14 -07:00
README.md Add some cool queue, stacks, strings, math, bit manipulation examples (#35) 2023-07-16 17:35:14 -07:00
sorting_algorithms.py Add some cool queue, stacks, strings, math, bit manipulation examples (#35) 2023-07-16 17:35:14 -07:00

sorting and searching


sorting_algorithms.py


> python3 sorting_algorithms.py


Array: [3, 5, 1, 2, 10, 6]
Testing merge sort: [1, 2, 3, 5, 6, 10]
Testing quick sort: [1, 2, 3, 5, 6, 10]

binary_search.py


> python binary_search.py
Recursive:  6
Iterative:  6