Skip to content

Coding Interviews

Glossary

141 terms from Coding Interviews, in plain words, each with the chapter that teaches it.

A

AI-assisted round
A coding round where an AI chat assistant is part of the setup. You are scored on solving the problem, on understanding the code the AI wrote, and on testing and fixing it.
API (application programming interface)
A set of addresses and rules that lets one program talk to another. Kettle & Crane's order API is how its shop and apps place and read orders.
API endpoint
A named address that other programs call, written as a method and a path, such as `GET /orders/{id}/status`. `GET` reads data and `POST` sends new data.
assert
A Python statement that checks a condition is true. If it is false, Python stops with an `AssertionError`, which makes it a quick way to test your code.
AttributeError
A Python error raised when you use an attribute that an object doesn't have. In the linked-list code it happens when `fast.next` is used while `fast` is `None`.

B

Back-of-the-envelope estimate
A quick, rounded calculation that shows the scale of a system, such as requests per second or storage per year. Only the order of magnitude matters.
Backtracking
A way to list every possible answer by building it one choice at a time: choose an item, explore the rest by recursion, then un-choose it so the next branch starts clean. Its cost is O(2ⁿ), so it suits small inputs.
Base case
The simplest input of a recursive function, answered directly without recursing, such as an empty tree (`None`) or `i == len(items)`. Without it, recursion never stops.
Base salary
The fixed yearly pay in a job offer, before any bonus or equity.
Behavioral interview
A round, run by Sam at Kettle & Crane, that asks about your past work to predict how you will work with people. You answer with real stories.
BFS (breadth-first search)
A search that explores a grid or graph one step at a time using a queue, so the first time it reaches the goal is by the fewest steps. It is the pattern for shortest-path questions on a map.
Big-O
A way to describe how a solution's running time or memory grows as the input gets bigger, such as O(n) or O(n²). Interviewers expect you to state it for your solution.
Binary search
Finding something in sorted data by repeatedly checking the middle and discarding half, which costs O(log n). It also finds the first day that reaches a goal. Python's `bisect.bisect_left` finds a position in a sorted list.
Bonus
Extra cash on top of base salary, often a target percentage of base. It is not guaranteed.
Bottleneck
The part of the brute-force solution that costs the most time, such as repeated `in` checks on a list. You attack it first when looking for a better approach.
Bottom-up
Dynamic programming that skips recursion and fills a table from the smallest subproblem upward. Each entry is worked out from smaller entries already stored, as in `fewest_table`.
Brute force
The simplest correct solution, which tries every possibility. It is usually slow, but stating it first proves you can solve the problem and gives you something to improve.
Brute-force checker
A slow but obviously correct function that you compare against your fast one on many random inputs. It finds bugs in cases you didn't think to try.

C

Cache
Fast memory that keeps recent answers so repeated reads skip the database. The trade-off is that the answer can be slightly out of date.
CDN (content delivery network)
Servers around the world that keep copies of images and scripts close to users, so pages load faster.
Checking in
Pausing to ask the interviewer a short question, such as "Does that approach sound reasonable?", at the end of each step of the method.
Clarifying question
A question that pins down what a problem means before you solve it, such as whether the input can be empty or what to return when there is no answer.
Client
The customer's browser or app, which sends requests to a system.
Cliff
A waiting period, often one year, before any equity vests. After it, a first chunk such as a quarter vests at once.
Competing offer
A job offer from another company. You can mention a real one, with its numbers, while negotiating, but never invent one.
Constraints
The limits stated in a problem, such as "up to 100,000 items". They tell you how fast your solution must be, which sets your target Big-O.
Counteroffer
Your request for different terms after an offer. Ask for a specific number and give a reason, such as market data or another offer.
csv module
Python's built-in module for reading comma-separated files. Unlike plain `split(",")`, it handles commas inside quoted values.
Cycle
A linked list whose last node links back to an earlier node, so walking it never ends. Fast and slow pointers detect one because the fast pointer eventually meets the slow one.

D

Data model
The tables a system stores and their main columns, such as `orders` and `order_events` for order tracking.
Database
A system that stores data permanently, such as orders in tables.
Debrief
The meeting after the loop where interviewers share their notes and scores and decide whether to hire.
Deep dive
The last step of a design round, where you go into detail on the hardest part or the part the interviewer asks about.
deque
A Python list-like container from `collections` that is fast at both ends. BFS uses it as a queue, with `popleft()` taking the oldest item from the front.
DFS (depth-first search)
A search that follows one path as far as it can before backing up, usually written with recursion. Here it marks every cell of an island as visited.
Dry run
Running your code by hand on a small example while tracking every variable. A trace table keeps the record tidy.
Dynamic programming (DP)
Solving each overlapping subproblem once and saving the answer, using a memo dict (top-down) or a table (bottom-up). It speeds up recursion that repeats the same smaller questions.

E

Edge case
An unusual input at the limits, such as an empty list or a single item, where code most often breaks.
Edge-case checklist
A list to run through after your main example: empty, one item, two items, all the same, duplicates, zero or negative, sorted or reversed, very large.
enumerate
A Python built-in that gives you the index and the item together in one loop. The take-home uses it to skip the CSV header line.
Equity
Part ownership of a company, given to employees as RSUs or stock options and usually earned over time.
Exploding offer
A job offer that expires very soon, such as "decide by tomorrow". You can politely ask for a few more days.
Exponential time
A running time where the work doubles with every extra item. It is fine only for inputs up to about 20, as with listing every subset.

F

f-string
A Python string starting with `f` that inserts values inside braces. Options such as `:,` add thousands commas and `:.0f` shows no decimals.
Fast and slow pointers
Walking a linked list with two references, one moving a node per step and one moving two. When the fast one reaches the end, the slow one is at the middle, and if the list has a cycle they meet.
float("inf")
Python's infinity, a number bigger than any other. In DP it stands for "worse than any real answer" or "can't be done", so the first real answer always beats it.
Flood fill
Starting at one grid cell and spreading to every connected cell of the same kind, like paint. It is used to count separate areas such as shelf blocks.
Functional / non-functional requirements
Requirements are the first step of a design round. Functional requirements say what a system does, such as customers seeing an order's status; non-functional ones say how well: speed, uptime, scale or cost.

G

GET and POST
Two HTTP methods used in API endpoints. `GET` reads data, as in `GET /orders/{id}/status`, and `POST` sends new data, as in recording a status event.
Greedy
Taking the best-looking choice at each step. It only works for some problems, and fails for the 13 lb bag example with bags of 2, 5 and 6 lb.
Grid
Rows of cells stored as a list of strings or lists and read as `grid[row][col]`, such as the warehouse floor. Many problems hide a graph in a grid.

H

Hash map
A structure such as a Python dict or set that finds a key in O(1) on average. It answers "have we seen this?" and counts items in one pass.
heapq
Python's heap module. `nlargest` and `nsmallest` return the top k items by a `key`, in O(n log k).
Helper function
A small function that does one messy job for the main function and can be tested alone, such as `order_value` hiding the wholesale discount.
High-level design
The boxes-and-arrows picture of a system's main parts and how requests flow between them.
Hint
A nudge from the interviewer, such as "What if the list were sorted?". Taking one well counts as communication: say how it changes your plan, then use it.
Hiring committee
A group at some large companies that didn't meet you and decides from the interviewers' written feedback.

I

Idempotency key
An id, such as the reminder's id, sent with a request so the receiving service can ignore repeats. It prevents the same email being sent twice when a worker retries.
if __name__ == "__main__":
A Python idiom that runs code only when the file is run directly, not when another file imports it. It lets tests import your functions without printing the report.
In-bounds check
Making sure a neighbor cell is on the grid before reading it, such as `0 <= r < rows`.
Interval
A range stored as a `(start, end)` tuple, such as a delivery slot. Two intervals overlap when the second starts before the first ends, and sorting by start makes merging them easy.
Island
A group of connected cells of one kind in a grid, such as a block of shelves.

L

Lambda
A short anonymous Python function, often passed as `key=` to tell `sorted` or `heapq` what to compare, such as `lambda pair: (-pair[1], pair[0])`.
Latency / throughput
Latency is how long one request takes. Throughput is how many requests the system handles per second.
Leveling
The company's judgment of which job level, such as junior, mid-level or senior, your interviews show. The same problem is scored with different expectations at each level.
Levels.fyi and Glassdoor
Free websites where people share what they are paid by company and level, used to research a fair number before negotiating.
Load balancer
A component that spreads requests across several web servers, which helps scaling out and removes a single point of failure.
Loop (onsite)
The set of 2 to 5 final interview rounds held back to back, in person (onsite) or on video (virtual onsite).

M

Memo
A dict that saves each subproblem's answer so it is solved only once. You check it first and store every answer before returning it.
Message queue
A waiting list of jobs, such as "send this email", that a separate worker does later, with retries. A slow email service then never slows the main system.
Mock interview
A full practice interview under real conditions, with a timer and ideally a friend playing the interviewer.
Monotonic stack
A stack whose items are kept in increasing or decreasing order, popping items that break the order as new ones arrive. It is used for "next bigger value" questions.

O

Off-by-one error
A bug where a count or index is one too small or too large. For example, a window from `left` to `right` holds `right - left + 1` items, not `right - left`.
Offer
A company's proposal for your pay and terms, usually given by phone and then in writing.
Online assessment
A timed set of coding problems on a website that runs your code against hidden tests and grades it automatically.
Online judge
A practice website that checks your code against hidden tests. It helps with the Code and Test steps, but say your approach aloud first.
Overlapping subproblems
The same smaller question coming up again and again, such as the fewest bags for 28 lb. Spotting this is the cue to use dynamic programming.

P

Package
Code that other people publish for you to install, such as pytest.
Palindrome
A word or code that reads the same backward, such as the coupon code `KC5225CK`. Two pointers can check it without making a reversed copy.
Path
The partial answer a backtracking function is building, such as the items currently in a gift box.
Pattern
A shape of solution that fits many problems, such as "remember what you've seen in a set". Signal words in the problem, such as "top k" or "first repeated", point to the pattern.
Pay range
The lowest and highest pay a company plans for a role. Some states require it in job postings.
Pay-transparency law
A law that requires employers to include a pay range in job postings. Some also stop employers asking about your past pay.
Peak factor
A multiplier for how much busier the busiest moment is than the average, such as 10 times, used to turn average requests per second into a peak.
pip
Python's tool for installing packages, such as `python3 -m pip install pytest`.
Practice log
A simple table with one row per problem or mock: date, problem, pattern, time, whether you needed a hint, and one thing to remember. Use it to choose what to redo.
Prefix sum
A running-total list where `prefix[i]` is the total of the first `i` items, so any range total is one subtraction: `prefix[end] - prefix[start]`. It costs O(n) to build and O(1) per question.
Pruning
Abandoning a backtracking branch as soon as it can't lead to a valid answer, such as skipping an item that would push a gift box over budget.
Pseudocode
Your plan written in plain-language steps, often as comments before the real code. It shows the interviewer your plan and becomes your checklist.
pytest
The most widely used Python testing tool. It finds files named `test_*.py` and runs each function whose name starts with `test_`; `-q` keeps the report short.
Python standard library
The modules that come built in with Python, such as `heapq`, `random` and `collections`. They can be used without installing anything extra.

R

random.seed(1)
Starts Python's random numbers from a fixed point, so every run uses the same inputs and a failing test can be repeated. `random.randint(a, b)` picks a whole number including both ends.
Read replica
A copy of the database that serves reads, taking load off the main database.
README
The file a reviewer reads first. It says what a project does, how to run and test it, the decisions you made, and what you'd do with more time.
Recruiter screen
A short, friendly first call with the recruiter, who manages hiring for the company, about your background, the role and the process. There is no code.
RecursionError
A Python error raised when recursion goes too deep. On large inputs, use a stack-based DFS or a bottom-up DP table instead.
Referral
An employee recommending you for a job, which often gets your application read sooner.
Refresher
A new equity grant in a later year, offered by some companies.
Requests per second
How many requests a system receives each second. You estimate it from daily traffic and a peak factor to see what scale to design for.
RSU (restricted stock unit)
A share of company stock you receive gradually as it vests, common at large companies.
Rubric
The form each interviewer fills in, listing the qualities (signals) the company looks for, with a score and notes for each.

S

Scaling up / out
Scaling up means a bigger machine. Scaling out means more machines behind a load balancer, which also removes single points of failure.
Scorecard
Your own 1-to-4 score for each of the four signals after a mock interview.
Shared editor
An online editor, such as CoderPad, where you and the interviewer both see the code as you type. Some can run code and some can't.
Sign-on bonus
A one-time payment for joining. It is often the easiest part of an offer to negotiate, and some companies ask for it back if you leave within a year.
Signal
One thing a rubric scores. For coding rounds the four are problem solving, coding, communication and testing.
Signposting
Announcing your next step before you do it, such as "First I'll write a couple of examples."
Single point of failure
One part whose failure takes the whole system down, such as a single lone database.
Slice copy
`path[:]` makes a new list with the same items. Backtracking saves it instead of `path`, because `path` is the one list that keeps changing and would end up empty.
Sliding window
A run of neighboring items from `left` to `right` that moves along a list, with a running total updated as items enter and leave. A variable window grows with `right` and shrinks from `left`, and needs non-negative numbers.
Sort first
A pattern: sort the data so related items sit next to each other, which costs O(n log n). Python's `sorted` returns a new sorted copy and accepts a `key=` function.
Stack
A last-in, first-out structure. In Python it is a list where `append` pushes and `pop` pops, and it suits "most recent", undo and matching problems.
Stale data
A cached answer that is a little out of date, such as a customer seeing "packed" for a minute after Alex marks the order shipped.
STAR
A four-part shape for a behavioral answer: Situation, Task, Action, Result. About 60% of the time goes on what you did, using "I" and ending with a number.
Stock option
The right to buy company shares later at a fixed price, often given by startups.
Story bank
About six STAR stories, written out and practiced aloud, that cover different signals and answer most behavioral questions.
Subproblem
A smaller version of the same question, such as the fewest bags for 28 lb when solving 30 lb.
Subset
A selection of items from a list, possibly none. Three items have 2 × 2 × 2 = 8 subsets.
System design interview
An open, no-code round where you plan a whole system out loud, such as order tracking. It is scored on structure, scale reasoning and trade-offs.

T

Take-home
A small project, usually 2 to 4 hours, that you build on your own time and then discuss in a follow-up review. It is scored on running, correctness, clarity, tests and the README.
Technical phone screen
An early coding round of about 45 minutes with one engineer, solved in a shared editor.
Test function
A function named `test_` plus what it tests, whose `assert` lines check cases. pytest runs every such function automatically.
Thinking aloud
Saying your reasoning as you work, so the interviewer can follow it, score it and steer you early.
Timeboxing
Keeping to the stated time for a task, such as a take-home. Going far over doesn't impress.
Top k
A pattern for "the k largest" or "k busiest" questions. A heap holding only k items costs O(n log k), which beats sorting when k is small.
Top-down
Dynamic programming written as ordinary recursion plus a memo dict. It follows naturally from the brute force.
Topological sort, union-find, trie, bit tricks, Dijkstra
Less common techniques: topological sort orders tasks that depend on each other, union-find tracks groups that merge, a trie is a tree of letters for prefix search, bit tricks work on a number's binary digits, and Dijkstra finds shortest paths in weighted graphs.
Total compensation (TC)
All yearly pay added up: base, bonus, equity vesting that year and any sign-on bonus. Kettle & Crane's offer is $152,000 in year 1 and $142,000 from year 2.
Trace table
A table with one row per loop pass and one column per variable, used to record a dry run.
Trade-off
What you give up for what you gain with a design choice, such as a cache making reads fast but the data possibly a minute old.
Trading space for time
Using extra memory, such as a set or dict, to make a solution faster, so each lookup is O(1).
Tree recursion
The pattern for tree questions: return a base answer for an empty tree, ask each child for its answer, then combine them with the node's value. It costs O(n).
Tuple unpacking
Splitting a tuple into separate names in one line, such as `product, channel, price = order` or `for start, end in slots`.
Two pointers
Keeping two indexes, `left` at the front and `right` at the back of a sorted list, and moving one inward each step. It finds pairs in O(n) time and O(1) space.

V

Vesting
Equity becoming yours gradually, commonly over four years.
Virtual environment
A private set of packages for one project, created with `python3 -m venv .venv`. It fixes pip's `externally-managed-environment` error.
Virtual onsite
A loop of final interview rounds held on video instead of in person.
Visited set
A set of cells (or nodes) already seen, checked before adding a neighbor so a search never repeats work or loops forever.
VS Code
Visual Studio Code, a free code editor that is well suited to writing and running Python programs.

W

Walk-away number
The lowest total compensation you'd accept, decided before any call. Knowing it keeps you calm and tells you when to say no.
Web server
A program that runs your code, taking a request from a client and returning a response.