DSA Playground: Data Structures and Algorithms in Python: See every algorithm move: narrated, animated videos, a Python IDE in every lesson, and speed tests that teach you to write fast code
A fun, visual course on data structures and algorithms for anyone who knows basic Python: 14 modules, 56 lessons. Every lesson opens with a narrated video where the code runs for real in your browser while the data structure animates beside it: bars swap as they sort, pointers walk linked lists, trees light up node by node, and graphs fill in as a search spreads. Then you solve coding problems in the built-in IDE, check them instantly, and submit them to a checker that also tests your speed on big inputs. Learn Big-O, arrays, hashing, recursion, searching and sorting, linked lists, stacks and queues, trees, heaps, graphs, greedy algorithms and dynamic programming, finish with a delivery-route capstone, then go further with tries, segment and Fenwick trees, union-find, spanning trees, Bellman-Ford and Floyd-Warshall, KMP and rolling hashes, bit tricks and bitmasks, advanced DP, linear-time sorts and an O(1) LRU cache.
14 modules · 56 lessons · 456 practice questions · Intermediate · first module free, then $5
What you'll learn
- Explain how fast an algorithm is with Big-O, and spot the slow part of your own code.
- Solve array problems with two pointers, sliding windows and prefix sums.
- Use dictionaries and sets to turn slow searches into instant lookups.
- Think recursively, use memoisation, and explore choices with backtracking.
- Write binary search without bugs, and know how the classic sorts work and how fast they are.
- Build and change linked lists, stacks, queues, trees and binary search trees.
- Use heaps for top-k problems, and search graphs and grids with BFS and DFS.
- Recognise greedy and dynamic-programming problems and solve them step by step, ending with shortest delivery routes.
- Answer range queries fast with segment and Fenwick trees, and autocomplete words with a trie.
- Connect networks with union-find and spanning trees, and find shortest paths even with negative edges.
- Match strings in linear time, use bit tricks and bitmasks, and design data structures with O(1) operations.
Syllabus
- Thinking in Steps: Big-O — Count the steps an algorithm takes, compare growth curves, and turn a slow duplicate finder into a fast one.
- Arrays and Two Pointers — How arrays work in memory, two pointers, sliding windows and prefix sums.
- Hashing — How dictionaries and sets work inside, counting, complement lookups and grouping.
- Recursion — Base cases and the call stack, recursion on lists and strings, memoisation and backtracking.
- Searching and Sorting — Binary search and its cousins, simple sorts, merge sort and quicksort.
- Linked Lists — Nodes and pointers, inserting and deleting, reversing, and fast and slow pointers.
- Stacks and Queues — Stacks for undo and brackets, monotonic stacks, queues and deques, and a task scheduler.
- Trees — Binary trees, traversals, binary search trees and classic tree problems.
- Heaps and Graphs — Priority queues with heapq, graphs as adjacency lists, breadth-first and depth-first search.
- Greedy, Dynamic Programming and Capstone — Greedy choices, 1D and 2D dynamic programming, and a delivery-route capstone with Dijkstra.
- Advanced Trees — Tries for autocomplete, balanced trees and rotations, and segment and Fenwick trees for fast range queries.
- Advanced Graphs — Union-find, minimum spanning trees, Bellman-Ford and negative cycles, and all-pairs shortest paths for a metro planner.
- Strings and Bits — Fast string matching with KMP and rolling hashes, bit manipulation, and bitmasks for subsets and tiny route plans.
- Advanced DP, Sorting and Design — Longest increasing subsequence, edit distance and interval DP, linear-time sorts, and designing an O(1) LRU cache.