Track 2 of 4 · 6 short steps
Thinking in Algorithms & Data
Goal: Understand why some code runs slowly and how to pick the right shape for your data.
Why this matters
AI tools write code that works on the demo data. Algorithms and data structures are about what happens when the data gets real: 10,000 listings, 50 users clicking at once, a list that keeps growing. This track gives you the vocabulary to spot slow code before your users do.
The steps
Each step is a 2-minute read with a quick check at the end.
- Step 1
Big-O notation (time and space)
- Step 2
Arrays, linked lists, stacks and queues
- Step 3
Hash maps (objects, dictionaries, Maps, Sets)
- Step 4
Trees and graphs
- Step 5
Searching and sorting
- Step 6
Recursion, BFS and DFS
Try it
Game: guess the Big-O
What's the cost of each line as the data grows? Score: 0/6
users.get(id) // Map lookupfor (const x of list) total += xfor (a of list) for (b of list) compare(a, b)binarySearch(sortedList, target)list.sort((a, b) => a - b)orders.map(o => users.find(u => u.id === o.userId))AI mistakes to watch for
.find()or.filter()inside a.map()over large lists (hidden O(n²)).- Calling the database or an API inside a loop (the 'N+1 query' problem) instead of one batched query.
- Using
.sort()on numbers without a compare function. - Fetching every row and paginating in the browser instead of using LIMIT/OFFSET or cursors in the query.
- Recursion with no depth limit on user-supplied data.
- Re-computing the same expensive value on every render instead of caching or memoizing it.
Tip: paste a file into your AI tool and ask, "Check this for each of these issues and explain any you find." Then verify what it says yourself.
Milestone checklist
Your ticks are saved in this browser only.
Reading & free resources
- Grokking Algorithms (Aditya Bhargava)The core book for this track. Illustrated, friendly, no heavy math.
- VisuAlgoAnimated visualizations of sorting, trees, graphs and more.
- NeetCode RoadmapA structured order to tackle practice problems, with free video explanations.
- LeetCode problem setWhere to do the 30-problem milestone. Filter by Easy first.
- Big-O Cheat SheetQuick reference for the cost of common operations.
- MDN: Array.prototype.sort()Read it once; you'll never ship the number-sort bug again.