MicrolearnENPTES

Learn algorithms: 20 free interactive lessons

Short lessons where every idea is an animation you step through: searching, Big-O, sorting, stacks and queues, hash tables, heaps, trees, graphs, recursion and dynamic programming.

Do it in the browser: a real algorithms tool, a short mission and instant feedback. No install. Optional certificate at the end of the course.

Open the course

Lessons

  1. Searching one by oneAn algorithm is a precise recipe. The simplest one: look at every item until you find the one you want.
  2. Big-O: how work growsCompare algorithms by how their cost grows with the input size, not by seconds on one computer.
  3. Binary searchOn a sorted list, check the middle and throw away half. 1,000,000 items need about 20 looks.
  4. Two pointersFind a pair that adds up to a target in one pass, instead of checking every pair.
  5. Bubble sortCompare neighbours and swap: big values bubble to the end.
  6. Insertion sortLike sorting cards in your hand: take the next one and slide it into place.
  7. Merge sortSplit the list in halves, sort each half, merge the sorted halves.
  8. QuicksortPick a pivot, put smaller values left and bigger right, repeat on each side.
  9. StacksLast in, first out: undo, the call stack and balanced brackets.
  10. QueuesFirst in, first out: tasks, messages and fair waiting.
  11. Hash tablesTurn a key into a position and find things in O(1) on average.
  12. Heaps and priority queuesAlways know the smallest item, even while items keep arriving.
  13. Binary search treesSmaller to the left, bigger to the right: binary search that can grow.
  14. Walking a treePre-order, in-order and post-order: three ways to visit every node.
  15. Breadth-first searchExplore in rings around the start to find the shortest path in steps.
  16. Depth-first searchGo as deep as possible, back up at dead ends: backtracking.
  17. Dijkstra's shortest pathsWhen roads have different lengths, always expand the closest unfinished place.
  18. RecursionA function that calls itself on a smaller problem, and the cost of repeating work.
  19. Dynamic programmingSolve each small problem once, store it, build the big answer from the table.
  20. Greedy algorithmsTake the best-looking choice now. Sometimes perfect, sometimes a trap.