iq.lab
Python sleeps until you run code

Coding interviews, in Python, from the ground up

From the first loopto the hard ones.

Coding interviews from the ground up, in Python. Watch every line run, learn one way of thinking that works on every problem, then practice until mediums feel routine and hards feel possible.

15 modules · 58 lessons · 3 problems · about 49 hours · Python runs in your browser · no signup

30
81
22
93
44
notebookbest = 9
every number visited: the answer is 9

Every algorithm answers four questions

  1. 1Walk

    The order you visit the data: left to right, from both ends, ring by ring, choice by choice.

  2. 2Notebook

    The few things you write down as you go: a best so far, a dict of what you have seen, a stack, a table.

  3. 3Promise

    What stays true about the notebook after every step. It is why the code is right, and what you say out loud.

  4. 4Cost

    How long the walk is and how big the notebook gets: the Big O an interviewer will ask for.

Watch every line run

Code on one side, every name and value on the other, one step at a time. Then watch your own code the same way.

Predict, then write

Guess the output, put lines in order, then write the function from a blank editor. Tests say exactly what is off.

Practice that sticks

3 problems that point to their LeetCode twins, re-solves at 1, 3, 7 and 14 days, mixed sets and an error journal.

Say it like the round

Every pattern ends with what to say, the follow-up questions interviewers ask, and testing without a run button.

Foundations

Read Python the way the computer runs it, and count what it costs.

  1. 00The interview and this labWhat gets tested, and one way of thinking for all of it105 min
  2. 01Python, one step at a timeRead code the way the computer runs it250 min
  3. 02Counting steps: Big OHow long the walk is, how big the notebook gets130 min

Data structures

Lists, hash maps, stacks, queues, linked lists, trees and heaps, from the inside.

  1. 03Arrays and hash mapsFind anything in one step260 min
  2. 04Two pointers and sliding windowsTwo fingers on the data205 min
  3. 05Stacks and queuesLast in, first out, and first in, first out155 min
  4. 06Sorting and binary searchOrder makes everything faster210 min
  5. 07Linked listsData that points to the next piece150 min
  6. 08Recursion and treesSolve it by trusting a smaller version265 min
  7. 09Heaps and triesKeep the best on top; share the prefixes155 min

Patterns

Graphs, backtracking, dynamic programming and greedy choices.

  1. 10GraphsThings, and the connections between them310 min
  2. 11BacktrackingTry a choice, undo it, try the next110 min
  3. 12Dynamic programmingRemember the answers to smaller questions270 min
  4. 13Greedy and a little mathWhen the best move right now is the best move overall90 min

Interview mode

Recognize the pattern, run the round, and take on hard problems.

  1. 14Interview modeFrom knowing patterns to passing rounds250 min

The plan around it

Open the plan

A 16 to 20 week plan for coming back to coding interviews, built from research on how Google, Meta and other Bay Area companies run L3 and L4 loops: what each round scores, when to schedule what, and the readiness checks to pass before a dream-company loop.