iq.lab
Python starts when a code cell comes near or you run one
00 The interview and this lab

Lesson 1 of 3

What the interview actually tests

One 45-minute round, four scores, a few company formats, a short list of question families and five follow-up shapes. Know the test before you practice for it.

About 55 minutes
By the end you can
  • Lay out a 45-minute coding round phase by phase and say what each phase is for

  • Name the four scored dimensions and explain why correct code still comes first at L3 and L4

  • Test code you cannot run by tracing a typical case and the edge cases by hand

  • Tell the speed, depth and polish formats apart, and know what to ask your recruiter about level

  • Map the recurring question families to the modules of this course

  • Name the five follow-up types, tell which one an interviewer is asking, and give a short answer to each

Picture the call. A video window, a shared editor with a problem pasted at the top, and 45 minutes on the clock. You type, and the interviewer watches the same screen. In many rounds there is no Run button: your code is never executed, so the only proof that it works is the proof you give by hand. When the call ends, the interviewer writes up what they saw. At Google, a committee that never met you decides from that written feedback.

You practice best for a test you understand. This lesson lays it out as of late 2026: the minutes, the scores, the formats and levels, the recurring questions and the follow-ups. Formats move, so confirm the details of your own loop (the set of interviews for one job) with your recruiter.

Every fact about interviews here comes from the course's research digest, a summary of a dossier built from company documentation, interview platform data and candidate reports. Where the digest says how solid a fact is, the lesson keeps its label. Three labels appear:

LabelWhat it means
ReportedTrustworthy reporting from outside the company, not the company's own documents.
Candidate-reportedFirst-person accounts on forums. Good evidence that something happens, weak evidence of how often.
Platform dataRecords that interviewing.io, a site that runs technical interviews, keeps about the interviews held there. Its authors call it correlational: two things went together, which does not prove that one caused the other.

One round, minute by minute

What happens in those 45 minutes? A typical coding round at L3 and L4 is 45 minutes with one or two problems in a shared editor. L3 and L4 are Google's names for its entry and mid levels. Other companies use other names; a later section lines them up.

The research digest sets the bar for a mid-level (L4) generalist, an engineer hired for general software work rather than a specialty, in one line: an unseen medium solved, tested and narrated in roughly 20 to 30 minutes. Unseen means a problem you have not solved before. Medium is the middle of the three difficulty labels (easy, medium, hard) on LeetCode, the practice site this course points to. Narrated means you say your reasoning out loud as you work.

The same bar asks for two things nobody prompts you for: the cost of your solution (how its time and memory grow with the input, written in Big O notation such as O(n), which module 2 teaches) and edge cases (unusual inputs, such as an empty list). It also asks you to hold up under follow-up questions.

To fit all of that into one round, the digest gives a think-aloud script with five phases: clarify the question, plan the approach, implement it (write the code), test it, and summarize, which leads into the interviewer's follow-up questions. In the plan phase you name a brute force (the plain, slower solution that tries everything) and a better approach, each with its cost.

The timeline below lays out one round with one medium problem. Each block is a phase, as wide as its share of the minutes. A sixth block holds the hellos and your own questions. Select a phase to see what to do, a sentence to say (about two sum: find the two positions in a list whose numbers add up to a target) and which of the interviewer's four scores it feeds. The next section explains the scores. Before you look, guess how many of the 45 minutes go to writing code.

Writing code is about a third of the round: 15 of the 45 minutes. The other 30 go to talking and testing, and 25 of them feed the scores. The timeline takes the top of each range in the digest's script (clarify 2 to 3 minutes, plan 3 to 4, implement 12 to 15, test 5 to 7) and gives the remaining 16 minutes to the summary, the follow-ups, the hellos and your questions. Treat it as a budget: minutes you overspend in one phase come out of a later one.

Work it outWhen implementing runs long

In the one-medium timeline above, clarify and plan take minutes 0 to 7. Suppose implementing takes 20 minutes instead of 15. The round still ends at minute 45, and intro and questions still take their 5 minutes. How many minutes are left for testing, the summary and the follow-ups together? Type a whole number.

minutes

Type a number: 12, -1, 0.5 and 3/4 all work. Enter checks.

What the interviewer scores

What goes into the write-up? Documentation written for interviewers, from several sources, converges on four scored dimensions:

ScoreWhat the interviewer watches for
CommunicationYou ask before you assume, explain your plan, and narrate decisions while you code.
Problem solvingYou find an approach, compare it with a slower one by cost, and handle the follow-ups.
Technical competencyYour code is correct, readable Python.
TestingYou check your own code with a typical case and edge cases, and you find your own bugs.

The scores lead to a verdict on a four-step scale: Strong Hire, Hire, No Hire, Strong No Hire. One published rubric gives a word-for-word example of a Strong No Hire: announcing "done" over an untested, glaring bug. Both halves count: the bug, and declaring the code finished without checking it.

Correct code still dominates at mid level. In platform data from about 100,000 interviews, interviewers gave each candidate three scores, higher is better, written in this order: code, problem solving, communication. Candidates who scored 4-4-2 (strong code and solving, weak communication) advanced 96% of the time. Candidates who scored 3-3-4 (a step lower on code and solving, strong communication) were rejected about three times more often than the 4-4-2 group. The data is correlational, and the digest's advice from it is short: narrate, but never trade correctness for narration.

Quick checkThe Strong No Hire example

One published rubric gives a word-for-word example of behavior that earns a Strong No Hire. Which is it?

Choose one answer, then check.

Testing when nothing runs

How do you test code you cannot run? You trace it: follow the code one line at a time with real values, keeping track of what every name holds. (A name is a variable: a label that refers to a value.)

Here is a candidate's answer to a warm-up, an easy first problem: count how many numbers in a list are above a limit. They read it over once and said "done". It is the first code in this course, so here is every piece of Python it uses, top to bottom:

  1. def count_above(nums, limit): starts a function: a named piece of code with two inputs, nums (the list) and limit (the number to beat). The indented lines under it are its body. They run when the function is called, as in count_above([5, 1, 8], 4).
  2. count = 0 makes the name count refer to 0.
  3. for i in range(...): runs the indented lines under it once for each number the range hands out, with i naming the current one. range(n) hands out the whole numbers 0, 1, 2 and so on up to n − 1: it stops before n. len(nums) is the number of items in the list.
  4. if nums[i] > limit: runs the indented line under it only when the test is true. nums[i] is the item at position i, and positions count from 0.
  5. count += 1 adds one to count. It is short for count = count + 1.
  6. return count ends the call and hands the value of count back as the answer.

Module 1 slows all of this down, one piece at a time. For now, the list is enough to follow the figure.

The figure below is a trace: the code on one side, every name and its value on the other. Press Next to run one line. The highlighted line is the one about to run, and the arrow under the list marks position i. Under the buttons, the change line says what the last line to run changed (for example count: 0 → 1). The names inside a function call sit in their own box, labelled with the function's name: here count_above( ). The Output panel under the names shows anything the code prints, and this code prints nothing. One run through the loop's indented lines is called a pass.

Before you step through, work out the right answer for count_above([5, 1, 8], 4). Then trace the code in your head: what does it return?

Step throughDone too soon
Step 1 of 11
Line 1 is about to run.
def count_above(nums, limit):
count = 0
for i in range(len(nums) - 1):
if nums[i] > limit:
count += 1
return count
Names
no names yet
Output
(nothing printed yet)

The bug is on line 3. For a list of three numbers, range(len(nums) - 1) is range(2), which hands out 0 and 1. The last position is len(nums) - 1, which is 2. range stops before the number you give it, so this loop never reaches the last position.

One typical case, traced by hand, caught a glaring bug. That trace is the work the testing score rewards.

This course describes every algorithm with four answers, called the frame: the walk (the order we visit the input), the notebook (what we write down as we go), the promise (what is true about the notebook after every step) and the cost (how much time and memory it takes). The next lesson builds the frame slowly. Here it says what this function was meant to do:

The promise held on every pass of the buggy code: after two passes count was 1, and one of the two visited numbers (the 5) is above 4. What broke was the walk. The promise turns into the answer only when the walk has visited everything, and this walk stopped before position 2. So when you trace, check the walk as well as the notebook.

A bug like this can hide. Predict what the same buggy function prints for two lists that hold the same numbers in a different order.

PredictWhere the bug hides

This is the buggy count_above from the trace. Type exactly what the program prints, one value per line. The two lists hold the same numbers in a different order.

def count_above(nums, limit):
    count = 0
    for i in range(len(nums) - 1):
        if nums[i] > limit:
            count += 1
    return count

print(count_above([7, 2, 9, 3], 5))
print(count_above([7, 2, 3, 9], 5))

One passing example proves little. A checklist of cases catches much more. Here is the digest's checklist for rounds without execution, trimmed to what applies to this function (module 14 drills the full list):

  1. Reread the whole code once.
  2. Trace one typical case aloud, saying the value of each name as it changes.
  3. Trace an empty list and a one-item list.
  4. Trace duplicates and boundaries. A boundary is an edge: a value right at the edge of a rule, such as a number equal to the limit, or an item in the first or last position.
  5. Check every loop bound for off-by-one: a loop that runs one time too many or one too few. The bug above is an off-by-one.
  6. State the time and space cost. Only then say "done".

Now fix the function. The tests in the exercise turn that checklist into code.

Code itFix it before you say done

This is count_above from the trace, bug included. Fix it so it returns how many numbers in nums are strictly greater than limit (a number equal to limit does not count). Trace [5, 1, 8] with limit 4 in your head first, then press Run tests. When they pass, press Watch it run and check that the walk reaches every position.

⌘+Enter runsPython starts when a code cell comes near or you run one
Press Run tests to run your code and the checks.

Recap. Without a Run button, testing means tracing by hand. A typical case catches the glaring bugs. The empty list, one item and the boundaries catch the quiet ones. The promise tells you what the notebook should hold when the walk ends, and the walk must reach every item for that promise to be the answer.

Speed, depth and your level

Does every company run the same round? The core is the same. At every employer the research covers, from Google and Meta to strong second-tier companies, a classic algorithm coding round is still one you must pass. Newer formats sit on top of it: practical rounds closer to everyday engineering work, and AI-enabled rounds where an AI assistant is allowed. They have not replaced it. What differs between companies is the pressure (reported and candidate-reported):

  • Speed, at Meta. Two mediums in about 35 to 40 minutes of coding inside the 45, in CoderPad (a shared online editor), often with no code execution. The interviewer watches you test your own code.
  • Depth, at Google. One challenging medium-hard problem per 45 minutes, with no execution. Writing the brute force first (the plain, slower solution) for 10 to 15 minutes, then the faster version, is standard. Prompts can be vague, which makes clarifying questions part of the score.
  • Polish, at Stripe, OpenAI and Anthropic. Multi-part builds whose requirements grow as you go, graded on readable, modular code (code split into small parts with clear jobs).
  • Airbnb requires code that compiles. Pseudocode, code-like notes that would not run, is rejected (reported).
  • Amazon brings its Leadership Principles, its published list of workplace principles, into every round. Expect questions about them in coding rounds too.
Quick checkPracticing for the speed format

Your recruiter says the Meta coding round is two problems in CoderPad in 45 minutes. Based on the reported format, which practice setup fits it best?

Choose one answer, then check.

A level is a scope judgment, not a skill grade. Scope means how much of the work you own. Entry level owns tasks. Mid level owns a project from start to finish. Senior owns a team's outcomes and the ambiguity around them. Each company names its levels differently. This map is informal: it comes from community reports, not from the companies.

ScopeGoogleMetaAmazon
EntryL3E3L4 (SDE I)
MidL4E4L5 (SDE II)

Amazon's numbers run one higher, so compare scope, not digits. Mid level is commonly reported at about 2 to 5 years of experience, but that is a rule of thumb: the interviews decide the level, not years served.

At mid level, the coding rounds carry the most weight. System design rounds (designing a whole service, its parts and its storage, out loud) belong mostly to senior levels. There are two exceptions: at Google L4, design is often folded into the coding rounds, and Meta adds a 45-minute design round at E4 (both reported).

Ask about level before anything is scheduled. Downleveling, an offer at a lower level than the one you interviewed for, is common, and no trustworthy rate for it exists. Ask your recruiter which level the loop is calibrated for (the level the interviewers will judge you against) and at what level an offer would be written. Levels are sticky: once the interviews are over, the level is hard to change.

Recap. The classic round is everywhere. The pressure differs: speed at Meta, depth at Google, polish at Stripe, OpenAI and Anthropic. Levels are compared by scope, not by their digits, and you settle yours with the recruiter before the loop starts.

The questions that keep coming up

Which problems should you expect? Candidate reports from 2024 to 2026 name the same families of questions again and again. Here they are, ordered from most to least worth preparing for a generalist, with the module that teaches each (candidate-reported). You do not need to know these names yet; each module defines its own.

#Question familyTaught in
1Arrays, strings and hash maps, with two pointersModule 3, module 4
2Grid graphs and multi-source breadth-first search, such as rot spreading through a grid of orangesModule 10
3Binary tree traversals with a twist: right side view, vertical order, lowest common ancestorModule 8
4Topological sort and dependency orderModule 10
5Stacks, including monotonic stacksModule 5
6Intervals, heaps and top kModule 6, module 9
7Sliding windows and binary search, including searching on the answerModule 4, module 6
8Tries and prefix problemsModule 9
9Design as coding: an LRU or LFU cache, a hit counter, an in-memory key-value storeModule 7, module 14
10Dynamic programming: heavy at Airbnb, regular at Google and Amazon, lighter in Meta's screening roundsModule 12

Every family on the list has a home in this course. Modules 1 and 2 build the Python and the cost counting that all of them need. The course also covers backtracking (module 11) and greedy choices (module 13), which this list does not name, and module 14 practices picking the right pattern for a problem you have never seen.

A list like this is pattern evidence, not prevalence evidence. It tells you which kinds of questions appear, not how likely any single question is. Platform data: candidates who had seen a question before passed 65% of the time, against 49% on questions they had not seen. That gap tempts people to memorize lists. But word-for-word repeats are declining, and interviewers change the problems they ask. Learn each pattern and the ways it varies, not word-for-word answers.

Quick checkMemorize the list?

A friend says: "The top questions repeat, so I'm memorizing the 100 most frequent ones word for word." Which response fits the research?

Choose one answer, then check.

After your first answer: five follow-ups

What happens once your code works? The round goes on. Follow-up questions are predictable in shape, and there are five shapes. Here is each one, asked about the fixed count_above (the version with range(len(nums))):

TypeThe interviewer asksA good answer
Complexity probe"What does it cost now?""One pass over n numbers: O(n) time, O(1) extra space."
Scale shift"The numbers no longer fit in memory.""Read them one at a time, from a file or a stream, and keep the same single count. Memory stays O(1)."
Constraint flip"Now the list arrives sorted, smallest first.""The numbers above the limit sit together at the end. Binary search (module 6), which halves the range on each step, finds where they start in about 20 steps for a million numbers. The count is the length minus that position."
Extension"Also return where they are.""Keep a list of positions instead of a count. Its length is the count."
Rationale probe"Why loop over positions and not the numbers?""For the count alone, for x in nums is better. It hands me each number, with no positions and no stop to get wrong. Positions matter only when the answer needs them."

The extension changes the notebook, so it is worth watching. The notebook becomes a list, found, that collects positions instead of counting them. Before you step through, guess what positions_above([5, 1, 8], 4) returns.

Step throughAn extension: where are they?
Step 1 of 14
Line 1 is about to run.
def positions_above(nums, limit):
found = []
for i in range(len(nums)):
if nums[i] > limit:
found.append(i)
return found
Names
no names yet
Output
(nothing printed yet)

Compare it with the count_above card. The walk is the same. The notebook and the promise changed, and the extra space went from O(1) to O(n). To answer a follow-up, first find which part of the frame it touches. In the table, the complexity probe asks about the cost, the scale shift asks whether the notebook stays small, the constraint flip (a sorted list) changes the walk, the extension changes the notebook, and the rationale probe asks why you chose this walk. Every pattern in this course comes with its five follow-ups answered, so you meet them before an interviewer asks.

You also need minutes left for them. A fast, clean warm-up banks time for the follow-ups, which is where many rounds are decided (candidate-reported).

Quick checkName the follow-up

You have finished count_above. The interviewer asks: "Now the numbers can be negative, and so can the limit. Does your code still work?" Which of the five follow-up types is this?

Choose one answer, then check.

Last, say it. The words you write here are the words you will say in the room.

Say itYour first two minutes

The interviewer pastes this and stops talking: Given a list of daily order counts and a number k, return how many days had more than k orders. Write what you would say in the first two minutes, before any code.

A few sentences first: 0 of 60 characters.

Saved in this browser as you type.

Next: Walk, notebook, promise