Skip to content

A collection of classic algorithms I implemented to stay fresh

Notifications You must be signed in to change notification settings

owenm-26/algorithms

Repository files navigation

Algorithms

A collection of classic algorithms I implemented to stay fresh

Algorithm Complete

  • Binary Search
  • Merge Sort
  • Quicksort
  • Reverse Linked List
  • BFS
  • DFS
  • Topological Sort
  • Dijkstra's
  • Union Find
  • Kruskal's (MST)
  • Knapsack
  • Interval Scheduling
  • Interval Partitioning

Purpose

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.

Plan

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.

How to Run

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:

  1. Name the directory: ## - <Algorithm Name>
  2. Name the file: The name of the directory exactly except as one word in camel case (include apostrophes)
  3. Name the unit test method: <nameOfFile>Checker
    • Have all variable definitions inside the test method

Aiding Materials

🪧 Algorithm Directory Medium
🗂️ CS330 Algorithms Google Drive
📝 CS112 Data Structures Notes

About

A collection of classic algorithms I implemented to stay fresh

Topics

Resources

Stars

Watchers

Forks

Languages