CodeBlanks Logo Icon CodeBlanks
Free 4 levels

Algorithms

From Big-O and sorting to data structures, dynamic programming, shortest paths and expert topics.

The Algorithms course covers Big-O notation, sorting and search algorithms, data structures, dynamic programming, graph algorithms and expert topics such as NP-completeness.

  • 257 lessons
  • 17 h 8 min
  • 7 projects

No account needed, you can start right away. To save your progress, create a free account

Levels

The Algorithms course goes from zero to expert in four levels. Start at any level you like.
Not sure of your level? Take the placement test
Beginner

Learn algorithm basics, Big-O, arrays, search, sort, recursion, stack, queue and hash tables.

  • What is an algorithm?
  • Big-O notation
  • Array
  • Linear search
80 lessons · 5 h 20 min See lessons →
Intermediate

Learn merge, quick, heap, counting and radix sort, trees, graphs, BFS, DFS, greedy and backtracking.

  • Merge sort
  • Quick sort
  • Heap sort
  • Counting sort
80 lessons · 5 h 20 min See lessons →
Advanced

Learn dynamic programming, LCS, knapsack, shortest paths, MST, topological sort and advanced structures.

  • DP - Memoization
  • DP - Tabulation
  • LCS
  • Knapsack
56 lessons · 3 h 44 min See lessons →
Expert

Learn amortized analysis, NP-completeness, approximation and randomized algorithms, string matching, computational geometry, network flow and game theory.

  • Amortized analysis
  • NP-completeness
  • Approximation and randomized
  • String matching
41 lessons · 2 h 44 min See lessons →

Projects you will build

At every level you combine what you learned into a real page.

How does it work?

Short explanation

Each lesson explains one concept in a few short cards; no long videos or walls of text.

Try it right away

Multiple choice, fill-in-the-blank and matching exercises lock in what you just learned.

Write it yourself

You write real code in the in-browser editor; it is checked instantly and you see the result live.

Curriculum

62 groups · 257 lessons · 17 h 8 min

Learn algorithm basics, Big-O, arrays, search, sort, recursion, stack, queue and hash tables.

1
What is an algorithm?
4 lessons · 16 min
  1. 1 Algorithm definition Learn that an algorithm is a finite sequence of steps turning input into output. 4 min
  2. 2 Algorithm properties Learn finiteness, definiteness, input, output and effectiveness. 4 min
  3. 3 Pseudocode Learn to write algorithm steps in readable pseudocode. 4 min
  4. 4 Summary - Algorithm concept Tie definition, properties and pseudocode together with a mini task. 4 min
2
Big-O notation
4 lessons · 16 min
  1. 1 Time complexity Learn how runtime grows with input size. 4 min
  2. 2 Big-O definition Learn that Big-O is an upper bound with O(1), O(n), O(n^2) examples. 4 min
  3. 3 Comparing complexities Order O(1), O(log n), O(n), O(n log n), O(n^2) from fast to slow. 4 min
  4. 4 Summary - Big-O Practice Big-O with a mini task computing a function's growth rate. 4 min
3
Array
4 lessons · 16 min
  1. 1 What is an array? Learn that an array stores same-type elements in contiguous memory. 4 min
  2. 2 Array access Learn 0-based indexing and O(1) access. 4 min
  3. 3 Looping over an array Loop over an array with for and compute a sum. 4 min
  4. 4 Summary - Arrays Combine access and looping skills in a mini task. 4 min
4
Linear search
4 lessons · 16 min
  1. 1 Linear search idea Scan an array front to back to find a target in O(n). 4 min
  2. 2 Implementing search Turn linear search into pseudocode returning an index. 4 min
  3. 3 Best and worst case Best case O(1), worst case O(n) for linear search. 4 min
  4. 4 Summary - Linear search Call linear search and print the result in a mini task. 4 min
5
Search projectProject
4 lessons · 16 min
  1. 1 Project: Overview Plan a mini app that searches a grades array. 4 min
  2. 2 Grades array setup Define the grades array and print it. 4 min
  3. 3 Search function Add linear_search to the project and look up a target grade. 4 min
  4. 4 Print the result Print found/not-found based on the search result. 4 min
6
Bubble sort
4 lessons · 16 min
  1. 1 Bubble sort idea Compare neighbours, swap, bubble the largest to the end. 4 min
  2. 2 One pass Learn one pass over neighbour pairs. 4 min
  3. 3 Full sort Sort fully with multiple passes; O(n^2). 4 min
  4. 4 Summary - Bubble sort Implement bubble sort and print the result. 4 min
7
Selection sort
4 lessons · 16 min
  1. 1 Selection sort idea Find the minimum each round and place it at the front. 4 min
  2. 2 Finding the minimum Find the index of the minimum in a slice. 4 min
  3. 3 Swapping Swap the minimum to the front; count the rounds. 4 min
  4. 4 Summary - Selection sort Implement selection sort in a mini task. 4 min
8
Insertion sort
4 lessons · 16 min
  1. 1 Insertion sort idea Like sorting cards, insert each element into the sorted left part. 4 min
  2. 2 Shifting Shift elements right until the correct spot is found. 4 min
  3. 3 Placement Place the element in the gap and sort the whole array. 4 min
  4. 4 Summary - Insertion sort Implement insertion sort in a mini task. 4 min
9
Sorting projectProject
4 lessons · 16 min
  1. 1 Project: Overview Plan a mini app that sorts a price list. 4 min
  2. 2 Price array Define the price array and print it unsorted. 4 min
  3. 3 Apply sorting Sort prices with bubble sort. 4 min
  4. 4 Print the result Print the sorted price list. 4 min
10
Recursion basics
4 lessons · 16 min
  1. 1 What is recursion? A function calling itself is recursion. 4 min
  2. 2 Base case The base case stops the recursion. 4 min
  3. 3 Recursive step Break the problem into a smaller same-shape problem. 4 min
  4. 4 Summary - Recursion Write a recursive counting function in a mini task. 4 min
11
Fibonacci
4 lessons · 16 min
  1. 1 Fibonacci sequence Each number is the sum of the previous two in Fibonacci. 4 min
  2. 2 Recursive Fibonacci Write a recursive Fibonacci function. 4 min
  3. 3 Call tree Recursive Fibonacci repeats calls and is inefficient. 4 min
  4. 4 Summary - Fibonacci Print the first n Fibonacci numbers in a mini task. 4 min
12
Factorial
4 lessons · 16 min
  1. 1 Factorial definition n! = n * (n-1) * ... * 1 and 0! = 1. 4 min
  2. 2 Recursive factorial Write a recursive factorial function. 4 min
  3. 3 Choosing the base case See how 0! = 1 base case works and the danger of a wrong one. 4 min
  4. 4 Summary - Factorial Compute and print a number's factorial in a mini task. 4 min
13
Recursion projectProject
4 lessons · 16 min
  1. 1 Project: Overview Plan a recursive mini app for powers and combinations. 4 min
  2. 2 Recursive power Add a recursive power(base, exp) function. 4 min
  3. 3 Combination Compute C(n, k) using factorial. 4 min
  4. 4 Print the results Print the power and combination results. 4 min
14
Binary search
4 lessons · 16 min
  1. 1 Binary search idea Halve the range each step on a sorted array for O(log n). 4 min
  2. 2 Left right pointers Narrow the range with low and high pointers. 4 min
  3. 3 Base case When low > high the element is not present. 4 min
  4. 4 Summary - Binary search Implement binary search and print the result. 4 min
15
Linked list
4 lessons · 16 min
  1. 1 What is a linked list? Nodes link to the next node with a pointer. 4 min
  2. 2 Node definition A node has data and next fields. 4 min
  3. 3 Traversing the list Walk from the head to the end of the list. 4 min
  4. 4 Summary - Linked list Build three nodes and print their values in a mini task. 4 min
16
Stack
4 lessons · 16 min
  1. 1 What is a stack? A LIFO (last in first out) data structure. 4 min
  2. 2 Push and pop push adds, pop removes from a stack. 4 min
  3. 3 Peek and is_empty Peek the top without removing and check emptiness. 4 min
  4. 4 Summary - Stack Push and pop items and print the result in a mini task. 4 min
17
Queue
4 lessons · 16 min
  1. 1 What is a queue? A FIFO (first in first out) data structure. 4 min
  2. 2 Enqueue and dequeue enqueue to the back, dequeue from the front. 4 min
  3. 3 Front and back Manage front and rear pointers. 4 min
  4. 4 Summary - Queue Enqueue and dequeue items and print the queue in a mini task. 4 min
18
Hash table
4 lessons · 16 min
  1. 1 What is a hash table? Maps keys to values in O(1) average. 4 min
  2. 2 Hash function A hash function turns a key into an index. 4 min
  3. 3 Collision Two keys hitting the same index and chaining to resolve it. 4 min
  4. 4 Summary - Hash table Add key-value pairs and print them in a mini task. 4 min
19
Set
4 lessons · 16 min
  1. 1 What is a set? A set stores unique elements. 4 min
  2. 2 Add and lookup Add to a set and check membership. 4 min
  3. 3 Intersection and union Compute the intersection and union of two sets. 4 min
  4. 4 Summary - Set Add elements to a set and print it in a mini task. 4 min
20
Beginner finalFinal
4 lessons · 16 min
  1. 1 Challenge 1 Write an algorithm to find the largest element in an array. 4 min
  2. 2 Challenge 2 Use linear search to find a target. 4 min
  3. 3 Challenge 3 Sort an array with bubble sort and print it. 4 min
  4. 4 Challenge 4 Compute a factorial recursively and print it. 4 min

Learn merge, quick, heap, counting and radix sort, trees, graphs, BFS, DFS, greedy and backtracking.

1
Merge sort
4 lessons · 16 min
  1. 1 Divide and conquer Split the array, sort each half, then merge. 4 min
  2. 2 Merge operation Merge two sorted arrays into one sorted array. 4 min
  3. 3 Full merge sort Recursive merge sort with O(n log n) complexity. 4 min
  4. 4 Summary - Merge sort Implement merge sort and print the result. 4 min
2
Quick sort
4 lessons · 16 min
  1. 1 Pivot selection Pick a pivot and partition the array in quick sort. 4 min
  2. 2 Partitioning Put smaller-than-pivot left, larger right. 4 min
  3. 3 Recursive quick sort Recursively sort both sides; O(n log n) average. 4 min
  4. 4 Summary - Quick sort Implement quick sort and print the result. 4 min
3
Heap sort
4 lessons · 16 min
  1. 1 What is a heap? A complete binary tree stored as an array. 4 min
  2. 2 Heapify Sift a node down to restore the heap property. 4 min
  3. 3 Build heap and sort Build a heap, then extract one by one to sort. 4 min
  4. 4 Summary - Heap sort Implement heap sort and print the result. 4 min
4
Counting sort
4 lessons · 16 min
  1. 1 Counting idea Count each value, use cumulative sums to sort. 4 min
  2. 2 Count array Build a count array for the value range. 4 min
  3. 3 Output array Use the count array to produce a stable output. 4 min
  4. 4 Summary - Counting sort Implement counting sort and print the result. 4 min
5
Radix sort
4 lessons · 16 min
  1. 1 Radix idea Sort numbers digit by digit. 4 min
  2. 2 Digit pass Sort by each digit, starting from the least significant. 4 min
  3. 3 Stable sub-sort A stable sub-sort keeps previous passes intact. 4 min
  4. 4 Summary - Radix sort Implement radix sort and print the result. 4 min
6
Sorting projectProject
4 lessons · 16 min
  1. 1 Project: Overview Plan a mini app that sorts exam scores and prints stats. 4 min
  2. 2 Score array Put scores in an array and print them. 4 min
  3. 3 Apply merge sort Sort scores with merge sort. 4 min
  4. 4 Print statistics Print the lowest, highest and median score. 4 min
7
Tree
4 lessons · 16 min
  1. 1 What is a tree? A hierarchical structure of root and child nodes. 4 min
  2. 2 Node and edge Node, edge, leaf and depth terms. 4 min
  3. 3 Binary tree A binary tree has at most two children per node. 4 min
  4. 4 Summary - Trees Walk a small binary tree and print its values in a mini task. 4 min
8
Binary search tree
4 lessons · 16 min
  1. 1 BST rule Left child smaller, right child larger in a BST. 4 min
  2. 2 BST insert Insert a new value following the rule. 4 min
  3. 3 BST search Search a value in O(log n) average. 4 min
  4. 4 Summary - BST Insert items into a BST and print them in-order in a mini task. 4 min
9
AVL tree
4 lessons · 16 min
  1. 1 Balanced tree An AVL tree keeps height difference at most 1. 4 min
  2. 2 Rotation Single and double rotations restore balance. 4 min
  3. 3 Balance after insert Rebalance after an insert. 4 min
  4. 4 Summary - AVL tree Reinforce AVL logic with a mini task. 4 min
10
Heap
4 lessons · 16 min
  1. 1 Min and max heap Difference between min-heap and max-heap. 4 min
  2. 2 Insert Add at the end, sift up to restore the heap. 4 min
  3. 3 Extract Remove the root, move the last up, sift down. 4 min
  4. 4 Summary - Heap Add items to a max-heap and print the root in a mini task. 4 min
11
Priority queue
4 lessons · 16 min
  1. 1 What is a priority queue? A queue where each element has a priority. 4 min
  2. 2 Heap-based implementation A heap-backed priority queue gives O(log n) ops. 4 min
  3. 3 Push and pop push and pop respect priority. 4 min
  4. 4 Summary - Priority queue Push tasks and pop the highest-priority one in a mini task. 4 min
12
Data structures projectProject
4 lessons · 16 min
  1. 1 Project: Overview Plan a mini app managing tasks with a stack and queue. 4 min
  2. 2 Undo stack Push completed actions to an undo stack. 4 min
  3. 3 Pending queue Keep pending tasks in a queue. 4 min
  4. 4 Print the state Print the contents of the stack and queue. 4 min
13
Graph basics
4 lessons · 16 min
  1. 1 What is a graph? A graph has vertices and edges. 4 min
  2. 2 Adjacency list Each vertex stores its neighbours in a list. 4 min
  3. 3 Adjacency matrix A matrix with 1 for an edge between two vertices. 4 min
  4. 4 Summary - Graph Print a small graph as an adjacency list in a mini task. 4 min
14
Breadth-first search
4 lessons · 16 min
  1. 1 BFS idea Explore layer by layer from a start vertex. 4 min
  2. 2 Using a queue BFS uses a queue. 4 min
  3. 3 Marking visited Mark visited vertices to avoid repeats. 4 min
  4. 4 Summary - BFS Run BFS on a graph and print the order in a mini task. 4 min
15
Depth-first search
4 lessons · 16 min
  1. 1 DFS idea Follow a branch to the end before backtracking. 4 min
  2. 2 Stack or recursion DFS uses a stack or recursion. 4 min
  3. 3 Backtracking Backtrack at dead ends and try a new branch. 4 min
  4. 4 Summary - DFS Run DFS on a graph and print the order in a mini task. 4 min
16
Greedy algorithms
4 lessons · 16 min
  1. 1 Greedy approach Pick the local best at each step. 4 min
  2. 2 Coin change Greedy coin change example. 4 min
  3. 3 Greedy limits Greedy is not always optimal. 4 min
  4. 4 Summary - Greedy Print the greedy coin change solution in a mini task. 4 min
17
Divide and conquer
4 lessons · 16 min
  1. 1 Three steps Divide, conquer, combine. 4 min
  2. 2 Recursive structure Divide and conquer is recursive. 4 min
  3. 3 Master theorem Solve T(n) = aT(n/b) + f(n). 4 min
  4. 4 Summary - Divide and conquer Solve a problem by dividing it in a mini task. 4 min
18
Backtracking
4 lessons · 16 min
  1. 1 What is backtracking? Trial-and-error search method. 4 min
  2. 2 State tree Branch solutions into a tree and walk it. 4 min
  3. 3 Pruning Cut dead branches early to save time. 4 min
  4. 4 Summary - Backtracking Practice backtracking with a mini N-queens style task. 4 min
19
Graph projectProject
4 lessons · 16 min
  1. 1 Project: Overview Plan a mini app that finds shortest city links. 4 min
  2. 2 City graph Define cities as an adjacency list. 4 min
  3. 3 BFS for reachability Find reachable cities with BFS. 4 min
  4. 4 Print the result Print the reachable cities. 4 min
20
Intermediate finalFinal
4 lessons · 16 min
  1. 1 Challenge 1 Sort an array with merge sort and print it. 4 min
  2. 2 Challenge 2 Insert items into a BST and search. 4 min
  3. 3 Challenge 3 Run BFS on a graph and print the order. 4 min
  4. 4 Challenge 4 Print the greedy coin change solution. 4 min

Learn dynamic programming, LCS, knapsack, shortest paths, MST, topological sort and advanced structures.

1
DP - Memoization
4 lessons · 16 min
  1. 1 What is memoization? Cache sub-results to avoid recomputation. 4 min
  2. 2 Fibonacci memoization Speed up recursive Fibonacci with memoization. 4 min
  3. 3 Dict-based cache Build a cache with a dictionary. 4 min
  4. 4 Summary - Memoization Call memoized Fibonacci and print the result in a mini task. 4 min
2
DP - Tabulation
4 lessons · 16 min
  1. 1 What is tabulation? Fill a table bottom-up to solve sub-problems. 4 min
  2. 2 Building the table Fill a table array in order. 4 min
  3. 3 Fibonacci tabulation Compute Fibonacci with a table. 4 min
  4. 4 Summary - Tabulation Compute Fibonacci with tabulation and print it in a mini task. 4 min
3
LCS
4 lessons · 16 min
  1. 1 LCS definition The longest common subsequence of two sequences. 4 min
  2. 2 DP table Build a 2D DP table for LCS. 4 min
  3. 3 Backtracking the table Trace the LCS back from the table. 4 min
  4. 4 Summary - LCS Print the LCS length for two strings in a mini task. 4 min
4
Knapsack
4 lessons · 16 min
  1. 1 Knapsack problem Fill a capacity with weighted, valuable items. 4 min
  2. 2 0/1 knapsack DP Build a DP table for 0/1 knapsack. 4 min
  3. 3 Decision table Take-or-skip decision fills the table. 4 min
  4. 4 Summary - Knapsack Solve knapsack and print the best value in a mini task. 4 min
5
DP projectProject
4 lessons · 16 min
  1. 1 Project: Overview Plan a mini route planner using DP. 4 min
  2. 2 Cost table Define a cost table between cities. 4 min
  3. 3 DP solution Compute the cheapest route with DP. 4 min
  4. 4 Print the result Print the cheapest cost. 4 min
6
Matrix chain
4 lessons · 16 min
  1. 1 Multiplication order Parenthesisation changes matrix chain cost. 4 min
  2. 2 DP table Build a DP table for matrix chain. 4 min
  3. 3 Split point Find the best split point. 4 min
  4. 4 Summary - Matrix chain Print the minimum multiplication cost in a mini task. 4 min
7
Floyd-Warshall
4 lessons · 16 min
  1. 1 All pairs Shortest path between every pair of vertices. 4 min
  2. 2 Triple loop Nested k, i, j loops update the table. 4 min
  3. 3 Table update dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j]). 4 min
  4. 4 Summary - Floyd-Warshall Run Floyd-Warshall on a small graph in a mini task. 4 min
8
Dijkstra
4 lessons · 16 min
  1. 1 Single source Shortest path from one source to all vertices. 4 min
  2. 2 Priority queue Dijkstra uses a priority queue efficiently. 4 min
  3. 3 Relaxation Relax edges when a shorter path is found. 4 min
  4. 4 Summary - Dijkstra Run Dijkstra on a small graph and print distances in a mini task. 4 min
9
Bellman-Ford
4 lessons · 16 min
  1. 1 Negative weights Bellman-Ford handles negative weights. 4 min
  2. 2 Edge relaxation loop Relax all edges V-1 times. 4 min
  3. 3 Negative cycle Detect negative cycles. 4 min
  4. 4 Summary - Bellman-Ford Run Bellman-Ford and print distances in a mini task. 4 min
10
Kruskal
4 lessons · 16 min
  1. 1 Minimum spanning tree Find a minimum spanning tree of a graph. 4 min
  2. 2 Edge sorting Sort edges by weight and add greedily. 4 min
  3. 3 Cycle check Skip an edge if it would form a cycle. 4 min
  4. 4 Summary - Kruskal Run Kruskal and print the MST weight in a mini task. 4 min
11
Prim
4 lessons · 16 min
  1. 1 Prim idea Start at a vertex, add the cheapest edge each step. 4 min
  2. 2 Priority queue Prim uses a priority queue efficiently. 4 min
  3. 3 Visited set Mark vertices added to the tree. 4 min
  4. 4 Summary - Prim Run Prim and print the MST weight in a mini task. 4 min
12
Topological sort
4 lessons · 16 min
  1. 1 Dependency order Find a dependency order in a DAG. 4 min
  2. 2 DFS-based sort Reverse DFS finish times for a topological order. 4 min
  3. 3 Kahn algorithm Use in-degree counts to order vertices. 4 min
  4. 4 Summary - Topological sort Print a topological order in a mini task. 4 min
13
Union-find, trie, segment tree
4 lessons · 16 min
  1. 1 Union-find Union-find merges disjoint sets. 4 min
  2. 2 Trie A trie supports prefix search. 4 min
  3. 3 Segment tree Segment tree answers range queries. 4 min
  4. 4 Summary - Advanced structures Print union-find set merges in a mini task. 4 min
14
Advanced finalFinal
4 lessons · 16 min
  1. 1 Challenge 1 Compute Fibonacci with DP and print it. 4 min
  2. 2 Challenge 2 Compute and print the LCS length. 4 min
  3. 3 Challenge 3 Print shortest distances with Dijkstra. 4 min
  4. 4 Challenge 4 Print the MST weight with Kruskal. 4 min

Learn amortized analysis, NP-completeness, approximation and randomized algorithms, string matching, computational geometry, network flow and game theory.

1
Amortized analysis
4 lessons · 16 min
  1. 1 What is amortized? Average cost over a sequence of operations. 4 min
  2. 2 Aggregate method Sum total cost, divide by operations. 4 min
  3. 3 Dynamic array example Dynamic array doubles but amortized O(1). 4 min
  4. 4 Summary - Amortized Print amortized cost in a mini task. 4 min
2
NP-completeness
4 lessons · 16 min
  1. 1 P and NP Difference between P and NP. 4 min
  2. 2 NP-complete Properties of NP-complete problems. 4 min
  3. 3 Reduction Reduce one problem to another. 4 min
  4. 4 Summary - NP-completeness Print a problem classification in a mini task. 4 min
3
Approximation and randomized
4 lessons · 16 min
  1. 1 Approximation algorithms Polynomial-time approximate solutions. 4 min
  2. 2 Randomized algorithms Algorithms using random choices. 4 min
  3. 3 Las Vegas and Monte Carlo Compare Las Vegas and Monte Carlo. 4 min
  4. 4 Summary - Approximation and randomized Print a randomized approximate solution in a mini task. 4 min
4
String matching
6 lessons · 24 min
  1. 1 KMP algorithm KMP string matching with a prefix table. 4 min
  2. 2 Rabin-Karp Rabin-Karp hash-based string matching. 4 min
  3. 3 Boyer-Moore Boyer-Moore matching with the bad character rule. 4 min
  4. 4 Z-algorithm Match positions with the Z-function. 4 min
  5. 5 Suffix array Build a sorted suffix array. 4 min
  6. 6 Summary - String matching Print the match index with KMP in a mini task. 4 min
5
Computational geometry
6 lessons · 24 min
  1. 1 Vector cross product Determine orientation with the cross product. 4 min
  2. 2 Convex hull Compute the convex hull. 4 min
  3. 3 Line intersection Test whether two line segments intersect. 4 min
  4. 4 Closest pair Find the closest pair with divide and conquer. 4 min
  5. 5 Point in polygon Test point inclusion with ray casting. 4 min
  6. 6 Summary - Geometry Print the orientation of three points in a mini task. 4 min
6
Network flow
6 lessons · 24 min
  1. 1 Flow network Source-to-sink flow network model. 4 min
  2. 2 Ford-Fulkerson Find max flow with Ford-Fulkerson. 4 min
  3. 3 Edmonds-Karp BFS-based Edmonds-Karp algorithm. 4 min
  4. 4 Max-flow min-cut Max-flow min-cut theorem. 4 min
  5. 5 Bipartite matching Maximum matching in a bipartite graph. 4 min
  6. 6 Summary - Network flow Print the max flow in a mini task. 4 min
7
Game theory and parallel
6 lessons · 24 min
  1. 1 Minimax Minimax value in a game tree. 4 min
  2. 2 Alpha-beta pruning Speed up search with alpha-beta pruning. 4 min
  3. 3 Nash equilibrium Concept of Nash equilibrium. 4 min
  4. 4 Parallel algorithms PRAM parallel model. 4 min
  5. 5 MapReduce Distributed computing with MapReduce. 4 min
  6. 6 Summary - Game theory and parallel Print the minimax value in a mini task. 4 min
8
Expert finalFinal
5 lessons · 20 min
  1. 1 Challenge 1 Print the amortized cost. 4 min
  2. 2 Challenge 2 Print the KMP match index. 4 min
  3. 3 Challenge 3 Print the convex hull. 4 min
  4. 4 Challenge 4 Print the maximum flow. 4 min
  5. 5 Challenge 5 Final mini task: combine all modules. 4 min

Lessons are free, an account keeps your progress

You do not have to sign up. If you do, you continue where you left off and never lose your work.

  • Progress saved on every device
  • Earn XP and badges
  • Keep your daily streak
  • Get a certificate when you finish
create a free account

Frequently asked questions

Are the Algorithms lessons free?

Yes. All 257 lessons of the Algorithms course are free and you can start without an account.

Do I need any prior knowledge?

No. The beginner level starts from zero; a browser is all you need. If you already know the basics, start at a higher level.

How long does the course take?

Lessons take 2–8 minutes. The whole course is about 17 hours; with 15–20 minutes a day you can finish in a few months.

Do I get a certificate?

Yes. When you complete the course with a free account, a verifiable certificate is issued in your name.

Will I lose my progress without an account?

Without an account your progress is kept only in your current browser. When you create a free account it is moved to your account.

Next step Rust

Learn safe and fast systems programming with Rust's unique ownership model. Memory safety, concurrency and zero-cost abstractions.