MCPcopy
hub / github.com/egonSchiele/grokking_algorithms

github.com/egonSchiele/grokking_algorithms @main sqlite

repository ↗ · DeepWiki ↗
262 symbols 479 edges 135 files 25 documented · 10%
README

Grokking Algorithms

This is the code in my book Grokking Algorithms.

Check out Python Tutor, a great website that guides you through Python code line by line.

Errata

Here's the errata page.

Images

This repository contains every image in Grokking Algorithms in high resolution. These images are available for non-commercial use. If you use an image, please add "copyright Manning Publications, drawn by adit.io". You are welcome to use these images in any non-commercial materials (i.e. teaching materials, presentations, etc.)

Contributing

Thanks for wanting to contribute to this repo!

If you have found a mistake in the book or have a question, please email me as that will be the best way to get a response. My email is listed on my website, adit.io. If you would like to make a change, please go ahead and open a PR with your suggested change. I am quicker at responding to those than I am to issues.

It takes me a long time to respond to PRs. It's something I'm trying to get better at, but I apologize in advance for how long it will take. I will eventually get to it.

The contributions that are most useful are: - fixing errors in existing code - adding examples to new languages - modernizing code as the language evolves - making code easier to read.

I'm less likely to merge code that involves stylistic changes, and I'm very unlikely to merge PRs that add complex optimizations, as the main purpose of this repo is to have easy to read examples that help people understand concepts.

Thanks for contributing and I hope you're enjoying the book!

Extension points exported contracts — how you extend this code

Graph (Interface)
(no doc)
06_breadth-first_search/ts/01_breadth-first_search.ts
Graph (Interface)
(no doc)
09_dijkstras_algorithm/ts/iterable_graph.ts
HashTable (Interface)
(no doc)
05_hash_tables/ts/01_price_of_groceries.ts
HashTable (Interface)
(no doc)
05_hash_tables/ts/02_check_voter.ts

Core symbols most depended-on inside this repo

search_iterative
called by 6
01_introduction_to_algorithms/python/binary_search.py
lcs
called by 5
11_dynamic_programming/ts/01_longest_common_subsequence.ts
binarySearch
called by 4
01_introduction_to_algorithms/java/01_binary_search/src/main/BinarySearch.java
lcs
called by 4
11_dynamic_programming/javascript/01_longest_common_subsequence.js
max
called by 4
04_quicksort/java/04_recursive_max/src/RecursiveMax.java
isZeroOrOne
called by 4
03_recursion/java/03_factorial/src/Factorial2.java
isListEmpty
called by 3
01_introduction_to_algorithms/java/01_binary_search/src/main/BinarySearch.java
guessEqualsItem
called by 3
01_introduction_to_algorithms/java/01_binary_search/src/main/BinarySearch.java

Shape

Function 154
Method 74
Class 30
Interface 4

Languages

TypeScript34%
Java33%
Go18%
Python15%

Modules by API surface

01_introduction_to_algorithms/python/test_binary_search.py7 symbols
01_introduction_to_algorithms/java/01_binary_search/src/main/BinarySearch.java7 symbols
01_introduction_to_algorithms/java/01_binary_search/src/test/BinarySearchTest.java6 symbols
09_dijkstras_algorithm/ts/iterable_graph.ts5 symbols
04_quicksort/java/05_quicksort/src/Quicksort.java5 symbols
03_recursion/python/08_look_for_key.py5 symbols
03_recursion/java/02_greet/src/Greet.java5 symbols
10_greedy_algorithms/golang/01_set_covering.go4 symbols
09_dijkstras_algorithm/java/01_dijkstras_algorithm/src/DijkstrasAlgorithmPriorityQueue.java4 symbols
07_trees/java/Main.java4 symbols
06_breadth-first_search/java/01_breadth_first_search/src/BreadthFirstSearch.java4 symbols
06_breadth-first_search/Golang/01_breadth-first_search.go4 symbols

For agents

$ claude mcp add grokking_algorithms \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact