DSA Foundations · Free course
Data structures & algorithms
Start with an array index. Work up to graph traversal and dynamic programming in 19 interactive labs, each paired with a coding exercise.
0 of 100 coding exercises solved on this device
Exercises solved by language
- C
- — / 100
- C++
- — / 100
- Python
- — / 100
- Java
- — / 100
- JavaScript
- — / 100
Loading language totals…
Try binary search
Can you find 23?
Seven hidden numbers, sorted low to high. Flip a tile to decide where to look next.
Learn DSA through games
Loading game progress…
Course map
6 stages · 19 interactive labs
Stage 1Lookups and running time5 labs
What do you know at the start of a lookup? Try an index, a value to search for, a link and a key.
- Array indexesPractice · Right Rotation
- Linear searchPractice · Largest Array Element
- Big O and counting comparisonsPractice · Factorial
- Linked listsPractice · Build a singly linked list
- Hash tablesPractice · Hash table
Stage 2Strings and two pointers3 labs
Count repeated characters, walk inward from both ends of a string, and combine two sorted lists.
- Character frequencyPractice · Counting a Character
- Reversing with two pointersPractice · String Reversal
- Merging sorted arraysPractice · Merging Sorted Arrays
Stage 3Sorting, heaps and search4 labs
Put values in order, then use one comparison to rule out a whole range or branch.
- Bubble sortPractice · Mergesort
- Min-heap insertionPractice · Min-heap insertion
- Binary searchPractice · Binary search
- Binary search treesPractice · Validate a binary search tree
Stage 4Stacks and recursion2 labs
An editor remembers which change to undo. A recursive function remembers which call to resume. Trace the most recent unfinished item in each.
Try the stage challengeStage 5Queues and graph traversal3 labs
Follow one branch of a graph in depth. Then use a queue to find a route with the fewest stops.
- QueuesPractice · Queue
- Depth-first searchPractice · Depth-first search on a graph
- Graph traversalPractice · Shortest paths with BFS
Stage 6Backtracking and dynamic programming2 labs
Build every possible selection, then see how saving a smaller answer can avoid repeated work.
- Backtracking with subsetsPractice · Generate subsets
- Dynamic programming with FibonacciPractice · Fibonacci sequence
Saved drafts
Loading saved drafts…