/grokking-algorithms

Solutions to problems listed in the book "grokking algorithms" by Aditya Y. Bhargava

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

grokking algorithms

GitHub license

Solutions to problems listed in the book "grokking algorithms" by Aditya Y. Bhargava

Problems

  • Binary Search
  • Selection Sort
  • Recursion
  • Maximum Square Plot (Divide & Conquer)
  • Quick Sort
  • Merge Sort
  • Hash Table Implementation
  • Breadth First Search
  • Dijkstra's Algorithm
  • Knapsack problem (Greedy approximation)
  • Set-covering Problem
  • Traveling Salesperson Problem (Greedy Approximation)
  • Knapsack problem (Dynamic Programming Optimal)
  • Longest Common Substring
  • Longest Common Subsequence

Requirements

  • Python 3.12+

Setup

python3 -m venv venv
venv/bin/python3 -m pip install --upgrade pip
venv/bin/python3 -m pip install -r requirements.txt

Formatting

venv/bin/python3 -m black .

Testing

venv/bin/python3 -m pytest --cov