Skip to main content

Topic roadmap

Data structures and algorithms

6 lessons, about 15 hours in all, from the basics to advanced. Start with the first, or jump to what you need.

Lessons, easiest first

  1. Data structures and algorithms · Beginner 3 · about 2 hArrays, strings and hash mapsUse arrays, strings and hash maps to solve counting, lookup and grouping problems in one pass, and recognise the interview patterns that need them.
  2. Data structures and algorithms · Beginner 3 · about 2 hBig-O and complexityRead and state the time and space complexity of simple code, compare O(1), O(log n), O(n), O(n log n) and O(n²), and use that to pick the faster approach before you run anything.
  3. Data structures and algorithms · Intermediate 1 · about 3 hSorting, binary search and two pointersExplain how the main sorting algorithms work and what they cost, use binary search on sorted data and on answers, and solve pair and window problems with two pointers.
  4. Data structures and algorithms · Intermediate 1 · about 2 hStacks, queues and linked listsExplain how stacks, queues and linked lists work, choose the right one for a problem, and solve classic problems such as matching brackets and processing tasks in order.
  5. Data structures and algorithms · Intermediate 1 · about 3 hTrees and graphsRepresent trees and graphs in code, traverse them with breadth-first and depth-first search, and choose between them to find shortest paths, connected groups and cycles.
  6. Data structures and algorithms · Intermediate 2 · about 3 hRecursion and dynamic programmingWrite recursive solutions with clear base cases, spot overlapping subproblems, and turn slow recursion into fast dynamic programming with memoization or a bottom-up table.

Books on data structures and algorithms

All recommended books

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.