A collection of classic algorithms I implemented to stay fresh
- Binary Search
- Merge Sort
- Quicksort
- Reverse Linked List
- BFS
- DFS
- Topological Sort
- Dijkstra's
- Union Find
- Kruskal's (MST)
- Knapsack
- Interval Scheduling
- Interval Partitioning
In order to not forget these important algorithms I created this repository for both reference as well as a way to track how often I implement them from scratch.
To implement each of these algorithms once every two months. I later hope to implement these algorithms in multiple languages, but for now I will start with Python since that is what I leetcode with. I am tracking my progress on a this spreadsheet.
Each algorithm has its own unit tests within its own directory which can be run by running the file within the respective directory. However to test them all at once and see how you've done, run python unitTestAll
in the root directory and it will return your score.
The script is also designed to work even as more algorithms are added so be sure to follow the following conventions so that the script works:
- Name the directory:
## - <Algorithm Name>
- Name the file: The name of the directory exactly except as one word in camel case (include apostrophes)
- Name the unit test method:
<nameOfFile>Checker
- Have all variable definitions inside the test method
🪧 Algorithm Directory Medium
🗂️ CS330 Algorithms Google Drive
📝 CS112 Data Structures Notes