Interactive course
DSA for coding interviews
Data structures and algorithms you can see and play with, from how an array sits in memory to the patterns big tech and AI companies ask in interviews.
You are here: Car park
Hi, I am Okto, your guide on this island.
Every place on it hides a real-life puzzle.
Your first puzzle
Your next step
How an array really works
Stop 1: Arrays and strings 8 min
Chapter 1 of 6 · 0 done in this module
New to this: smaller puzzles and more help along the way.
Learning streak
0 days in a row
Play a step a day to start a streak. Flashcards count too.
Your rank
Starter
0 points
100 points to Explorer. Finish chapters and win stars to climb.
- Stars
- 0 of 174
- Chapters
- 0 of 58
- Day streak
- 0 days
- Badges
- 0 of 13
Module badges
- Arrays and strings: badge not won yet
- Hash maps and sets: badge not won yet
- Sorting and binary search: badge not won yet
- Linked lists: badge not won yet
- Stacks, queues and monotonic tricks: badge not won yet
- Recursion and backtracking: badge not won yet
- Trees: badge not won yet
- Heaps and priority queues: badge not won yet
- Graphs: badge not won yet
- Dynamic programming: badge not won yet
- Tries and bits: badge not won yet
- Problems AI companies like: badge not won yet
- Interview playbook: badge not won yet
Your journey
13 stops and 58 chapters, in the order that builds best. Jump in anywhere you like.
Arrays and strings
FoundationCar park. Memory, cost, and the four patterns behind most array questions.
- How an array really worksNextWhy reading arr[i] is instant but inserting in the middle is slow. 8 min Index access
- Big-O without the mathsFeel how work grows from 10 to a million items, and read the cost of any loop. 10 min Complexity
- Two pointersWalk in from both ends of a sorted array and skip most of the pairs. 12 min Two pointers
- Sliding windowGrow and shrink a window to find the best stretch in one pass. 14 min Sliding window
- Prefix sumsPay once up front, then answer any range total with one subtraction. 12 min Prefix sum
- Best stretch: Kadane's algorithmDecide at every number: keep going or start fresh. 10 min Kadane
Hash maps and sets
CorePost office. Trade a little memory for instant lookups.
- Inside a hash mapBuckets, collisions, and why lookups are O(1) on average. 14 min Hash map
- Counting thingsAnagrams, top words and duplicates with one counting pass. 13 min Frequency map
- Seen before? Two Sum and friendsRemember what you have seen so each item is checked once. 13 min Complement lookup
- Sets as memoryLongest consecutive run, visited states and fast membership. 13 min Hash set
Sorting and binary search
CoreLibrary. Order first, then search smart.
- How sorting worksBubble, merge and quick sort side by side, and what stable means. 14 min Merge sort
- Merging intervalsSort by start, then sweep: meetings, bookings and time ranges. 12 min Sort and sweep
- Binary searchHalve the search every step, and get the boundaries right. 12 min Binary search
- Binary search on the answerWhen you cannot search the data, search the answer instead. 12 min Search on answer
- Kth largest with quickselectFind the kth item without sorting everything. 12 min Quickselect
Linked lists
CoreTrain yard. Nodes, arrows and careful pointer moves.
- Nodes and pointersInsert anywhere in O(1), but pay to find things. 12 min Linked list basics
- Reversing a listThree pointers and the order you move them in. 12 min Pointer rewiring
- Fast and slow pointersFind the middle and catch a loop with Floyd's method. 14 min Floyd cycle detection
- Merging listsDummy heads and clean merges. 12 min Dummy node
Stacks, queues and monotonic tricks
CoreContainer yard. Last in first out, first in first out, and stacks that stay in order.
- Stacks and matching bracketsUndo, Back and Valid Parentheses. 12 min Stack
- Monotonic stackNext warmer day, largest rectangle and trapping rain water. 14 min Monotonic stack
- Queues and dequesFair lines, and the maximum of every window. 14 min Monotonic deque
- Design an LRU cacheA hash map and a linked list working together. 14 min Design
Recursion and backtracking
CoreHedge maze. Solve a small piece, trust the rest, undo and try again.
Trees
InterviewThe grove. Folders, family trees and search trees.
- Tree basicsRoots, leaves, depth and levels. 10 min Tree recursion
- Depth-first traversalsPre, in and post order, by hand and in code. 12 min DFS
- Level by levelBreadth-first search with a queue. 12 min BFS
- Binary search treesInsert, search, validate, and why balance matters. 14 min BST
- Lowest common ancestorWhere two paths from the root split. 12 min Tree recursion
- Saving and rebuilding a treeSerialize and deserialize with markers for empty spots. 12 min Preorder with nulls
Heaps and priority queues
InterviewFruit stall. Always know the smallest or biggest, fast.
- Inside a heapA tree stored in an array that bubbles up and sinks down. 14 min Priority queue
- Top KKeep a small heap of size k instead of sorting everything. 12 min Top K
- Merge K sorted listsKeep one front per list in a heap and pop the smallest. 12 min K-way merge
- Median of a streamTwo heaps balanced in the middle. 14 min Two heaps
Graphs
InterviewHarbour. Maps, networks and dependencies.
- Seeing the graphTurn friends, maps, words and tasks into nodes and edges. 14 min Graph modelling
- Flood fill: number of islandsScan a grid and flood each new island with BFS or DFS. 15 min Grid BFS/DFS
- Order of tasksCourse schedule and build order: take tasks that wait for nothing. 14 min Topological sort
- Shortest route: DijkstraSettle the closest town that is not final, then try its roads. 16 min Dijkstra
- Union-FindMerge groups and ask who belongs together, almost instantly. 15 min Union-Find
Dynamic programming
InterviewTerrace fields. Remember answers to smaller questions.
- The idea behind DPMemoization and tables, from climbing stairs. 14 min Memoization
- Paths in a gridFill a table from the top-left. 14 min 2D DP
- Coin changeFewest coins and number of ways. 14 min Unbounded knapsack
- 0/1 knapsackTake it or leave it, for every item. 14 min 0/1 knapsack
- Longest increasing subsequenceFrom O(n^2) to O(n log n) with patience piles. 15 min LIS
- LCS and edit distanceCompare two strings cell by cell, like a diff tool. 16 min 2-string DP
Tries and bits
AdvancedSignal tower. Prefix trees for words, and tricks with binary.
Problems AI companies like
AdvancedTea stall and AI lab. Classic structures inside real AI systems.
- Build a tiny tokenizerByte pair merges with counting and a heap. 14 min Frequency map
- Top-k and top-p samplingPick the next word the way a language model does. 14 min Quickselect
- Beam searchKeep only the best few paths at every step. 14 min Heap
- Nearest neighboursFind the closest vectors, first by brute force, then smarter. 14 min Top K
- Rate limiter and response cacheSliding windows and LRU caches behind every AI API. 16 min Token bucket
Interview playbook
InterviewInterview stage. Spot the pattern, talk it through, and finish on time.
Play the idea
Move pointers, slide windows and fill tables yourself on a 3D table. Each chapter uses the picture that fits it best.
Learn from slips
Every move, right or wrong, says why. Hints know where you are stuck.
Spot the pattern
Each chapter ends with how to recognise it in a question, and classic problems to practise.
Made for you if you are
- Preparing for coding rounds at product, big tech or AI companies
- Know some code but freeze on interview questions
- Want to see why a pattern works, not memorise answers
Revise with flashcards
Quick daily review of the same ideas, with a final test and certificate.