A personal study notebook by @Qu1nel for algorithms, proofs, and complexity analysis. The explanation of each algorithm stands on its own and covers the problem, pseudocode, correctness argument and cost model. Implementations and their tests live in language folders next to the explanation. Each algorithm can gain implementations in other languages over time.
- Binary search · Python
- Jump search · Python
- Bubble sort · Python
- Shaker sort · Python
- Selection sort · Python
- Insertion sort · Python
- Comb sort · Python
- Heap sort · Python
- Merge sorted sequences · Python
- Merge sort · Python
- Quicksort · Python
- Fast power · Python and C
- Trial division · Python and C
- Miller–Rabin primality test · Python and C
The current tests use Python 3.11 or newer and GCC with C17 support. Set CC
to the compiler executable if you use another compiler.
python tests/run_checks.pyEach Python suite can also run on its own with unittest.
python -m unittest discover -s algorithms/search/binary-search/python