Part 1Getting started: how fastCounting steps, Big O, and where log n comes from.3 lessons · 0.5 h
Part 2Arrays and linked listsArrays by index, inserting and deleting, growing with realloc; linked list nodes, pointers, inserting and deleting, dummy head nodes, doubly linked and circular lists.7 lessons · 1.5 h
- Lesson 4Arrays: straight to any index12 minStart
- Lesson 5Inserting and deleting in an array15 minStart
- Lesson 6Arrays that grow: realloc14 minStart
- Lesson 7Linked lists: nodes and pointers14 minStart
- Lesson 8Inserting and deleting in a linked list15 minStart
- Lesson 9Doubly linked and circular lists14 minStart
- Lesson 10Patterns: arrays or linked lists18 minStart
Part 3Stacks and queuesArray and linked stacks, matching brackets, evaluating and converting postfix expressions, queues and circular queues (full or empty?), and the monotonic stack.5 lessons · 1.5 h
Part 4Hash tablesDesigning hash functions, handling collisions with open addressing and with chaining, load factors and resizing, and questions like collision counts and two sum.4 lessons · 1 h
Part 5TreesBinary trees and recursion, the four traversals, drawing a tree from its traversals, binary search trees, heaps and priority queues, heap sort and top k, Huffman trees: every step drawn on the tree.8 lessons · 2 h
- Lesson 20Binary trees and recursion15 minStart
- Lesson 21The four traversals of a binary tree16 minStart
- Lesson 22Drawing a binary tree from its traversals15 minStart
- Lesson 23Binary search trees17 minStart
- Lesson 24Heaps and priority queues17 minStart
- Lesson 25Heap sort and top k17 minStart
- Lesson 26Huffman trees and Huffman codes15 minStart
- Lesson 27Patterns: trees18 minStart
Part 6GraphsAdjacency matrices and lists, BFS and DFS, topological sort, Dijkstra's shortest paths, Prim's and Kruskal's minimum spanning trees (union-find), every step drawn on the graph.7 lessons · 2 h
- Lesson 28Storing graphs: adjacency matrices and lists16 minStart
- Lesson 29Breadth-first search17 minStart
- Lesson 30Depth-first search17 minStart
- Lesson 31Topological sort15 minStart
- Lesson 32Shortest paths: Dijkstra18 minStart
- Lesson 33Minimum spanning trees: Prim and Kruskal18 minStart
- Lesson 34Patterns: graphs18 minStart
Part 7SearchingSequential and binary search, binary search boundaries and searching for the answer, balanced trees (AVL rotations) and B-trees, and binary search decision trees and average search length.4 lessons · 1.5 h
Part 8SortingBubble, selection, insertion, Shell, merge, quick, counting and radix sort: each one watched as it really runs, comparisons and swaps counted, then compared on stability and complexity.6 lessons · 2 h
Part 9Algorithm designRecursion and divide and conquer, backtracking, greedy algorithms, dynamic programming and the knapsack problem: recursion trees, backtracking trees and DP tables drawn box by box.6 lessons · 2 h
Questions
Is it really free?
Yes. Every lesson, example and exercise is free, with no sign-up.
Do I need to know C first?
A little: variables, loops, functions, structs, and what a pointer is. If not, start with our C course; the pointer lessons matter most.
Is there a Python edition?
Yes: Data Structures and Algorithms in Python, the same chapters taught the Python way (/en/learn/dsa-py/).
Is there a C++ edition?
Yes: Data Structures and Algorithms in C++, where each structure is written by hand first, then with the STL (/en/learn/dsa-cpp/).
Where is my progress kept?
In this browser, with no account.