Wiki › Project
thealgorithm
Article
ReadAll pages
From Chaipat's knowledge graph
thealgorithm is a Python package of common algorithms and data structures, written from scratch and tested.
Contents
- Data structures: arrays, lists, nodes, stacks, queues, priority queues and trees, all built on shared abstract base classes.
- Sorting: heap sort and quicksort.
- Hashing: MD2, SHA-1 and SHA-2, implemented from their specifications.
- Compression: Huffman coding and run-length encoding.
- Text and data: cosine similarity and edit distance.
- Machine learning: Pegasos, a fast method for training support-vector machines.
- Assessment: the discrimination index, which measures how well an exam question separates strong students from weak ones.
Tests run in GitHub Actions, and the package installs with setup.py.