MCPcopy
hub / github.com/donnemartin/interactive-coding-challenges

github.com/donnemartin/interactive-coding-challenges @main sqlite

repository ↗ · DeepWiki ↗
480 symbols 1,437 edges 260 files 0 documented · 0%
README

interactive-coding-challenges

Binder

120+ continually updated, interactive, and test-driven coding challenges, with Anki flashcards.

Challenges focus on algorithms and data structures found in coding interviews.

Each challenge has one or more reference solutions that are:

  • Fully functional
  • Unit tested
  • Easy-to-understand

Challenges will soon provide on-demand incremental hints to help you arrive at the optimal solution.

Notebooks also detail:

  • Constraints
  • Test cases
  • Algorithms
  • Big-O time and space complexities

Also included are unit tested reference implementations of various data structures and algorithms.

Challenge Solutions

Anki Flashcards: Coding and Design

The provided Anki flashcard deck uses spaced repetition to help you retain key concepts.

Great for use while on-the-go.

Design Resource: The System Design Primer

Looking for resources to help you prep for the System Design and Object-Oriented Design interviews?

Check out the sister repo The System Design Primer, which contains additional Anki decks:

Notebook Structure

Each challenge has two notebooks, a challenge notebook with unit tests for you to solve and a solution notebook for reference.

Problem Statement

  • States the problem to solve.

Constraints

  • Describes any constraints or assumptions.

Test Cases

  • Describes the general and edge test cases that will be evaluated in the unit test.

Algorithm

  • [Challenge Notebook] Empty, refer to the solution notebook algorithm section if you need a hint.
  • [Solution Notebook] One or more algorithm solution discussions, with Big-O time and space complexities.

Hints

  • [Challenge Notebook] Provides on-demand incremental hints to help you arrive at the optimal solution. Coming soon!

Code (Challenge: Implement Me!)

  • [Challenge Notebook] Skeleton code for you to implement.
  • [Solution Notebook] One or more reference solutions.

Unit Test

  • [Challenge Notebook] Unit test for your code. Expected to fail until you solve the challenge.
  • [Solution Notebook] Unit test for the reference solution(s).

Index

Challenges Categories

Format: Challenge Category - Number of Challenges

Total number of challenges: 120

Reference Implementations: Data Structures

Unit tested, fully functional implementations of the following data structures:

Reference Implementations: Algorithms

Unit tested, fully functional implementations of the following algorithms:

Reference Implementations: TODO

Installing and Running Challenges

Misc

Challenges

Image Credits

Arrays and Strings

Binder

Challenge Static Notebook
Determine if a string contains unique characters ChallengeSolution
Determine if a string is a permutation of another ChallengeSolution
Determine if a string is a rotation of another ChallengeSolution
Compress a string ChallengeSolution
Reverse characters in a string ChallengeSolution
Given two strings, find the single different char ChallengeSolution
Find two indices that sum to a specific value ChallengeSolution
Implement a hash table ChallengeSolution
Implement fizz buzz [Challenge](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/arrays_strings/fizz_buzz/fizz_buzz_challenge.ipyn

Core symbols most depended-on inside this repo

insert
called by 80
graphs_trees/bst/bst.py
add_edge
called by 62
graphs_trees/graph/graph.py
append
called by 53
linked_lists/linked_list/linked_list.py
insert_to_front
called by 38
linked_lists/linked_list/linked_list.py
pop
called by 29
stacks_queues/stack/stack.py
insert
called by 27
graphs_trees/trie/trie.py
get_all_data
called by 24
linked_lists/linked_list/linked_list.py
push
called by 19
stacks_queues/stack/stack.py

Shape

Method 223
Class 137
Function 120

Languages

Python100%

Modules by API surface

staging/graphs_trees/binary_tree/binary_search_tree.py15 symbols
linked_lists/linked_list/linked_list.py13 symbols
graphs_trees/graph/graph.py12 symbols
graphs_trees/trie/trie.py9 symbols
graphs_trees/min_heap/min_heap.py9 symbols
arrays_strings/priority_queue/priority_queue.py9 symbols
stacks_queues/stack/stack.py8 symbols
graphs_trees/graph_shortest_path/priority_queue.py8 symbols
linked_lists/linked_list/test_linked_list.py7 symbols
graphs_trees/bst/bst.py7 symbols
stacks_queues/queue_list/queue_list.py6 symbols
staging/graphs_trees/binary_tree/test_binary_search_tree.py5 symbols

For agents

$ claude mcp add interactive-coding-challenges \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact