Educational implementations of common algorithms and data structures.
Warning: The provided implementations are for educational purposes only. The implementations are not production grade and the testing is neither complete nor comprehensive.
Data structures:
HashMap
: A reimplementation of CPython's built-indict
using optimized probingSimpleHashMap
: A simplified reimplementation of CPython's built-indict
using linear probingStack
: LIFO linear data structure implemented using a linked listQueue
: FIFO linear data structure implemented using a linked listStackBasedQueue
: FIFO linear data structure implemented using two stacks
Algorithms:
- Binary Search: O(log n) search on sorted lists
- Linear Search: O(n) search on unsorted lists
This project requires Python 3 and uses Bazel.
git clone git@github.com:danieljanes/algorithmics.git
cd algorithmics
bazel run //algorithmics:hash_map_example
bazel run //algorithmics:stack_example
bazel test //algorithmics:all
For more detailed test outputs pass the --test_verbose_timeout_warnings
flag:
bazel test //algorithmics:all --test_verbose_timeout_warnings