Coding Interviews in JavaScript
Glossary
139 terms from Coding Interviews in JavaScript, in plain words, each with the chapter that teaches it.
#
- 401(k)
- A US employer-sponsored retirement savings account. A company may add a 'match', putting in money when you do, which counts as a benefit.
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 writes, and on testing and fixing it.
- API (application programming interface)
- A set of addresses and rules that lets one program talk to another, such as Kettle & Crane's order API that its shop and apps call.
- API endpoint
- A named address that other programs call, written as a method and a path. For example, `GET /orders/{id}/status` reads one order's status.
- assert
- Node's built-in module for quick tests. `assert.equal(actual, expected)` does nothing if the values are strictly equal and throws an `AssertionError` if not; `assert.deepEqual` compares the contents of arrays, objects and Maps.
B
- Back-of-the-envelope estimate
- Quick, rounded arithmetic that shows the scale of a system, such as requests per second or storage per year. Only the order of magnitude matters.
- Backtracking
- Building an answer one choice at a time: choose an item, explore the rest by recursion, then un-choose so the next branch starts clean. It suits 'all combinations' problems on small inputs.
- Base case
- The simplest input a recursive function answers directly, without calling itself, such as an empty tree or `i === items.length`. Without it the recursion never stops.
- Base salary
- Your fixed yearly pay, 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 others. It scores ownership, teamwork, conflict, learning and impact.
- BFS (breadth-first search)
- A search that uses a queue to visit cells or nodes in order of distance from the start. On a grid it finds the fewest steps to a goal, such as a route across the warehouse floor.
- Big-O
- A way to describe how a solution's running time or memory use grows as the input gets larger, such as O(n) or O(n²). It is used to compare approaches and choose which one to implement.
- Binary search
- Finding something in sorted data by repeatedly checking the middle and discarding half. It costs O(log n), and it also finds the first day that reaches a goal.
- Bonus
- Extra cash on top of base salary, often a target percentage of base. It is not guaranteed to be paid in full.
- Bottleneck
- The part of a solution that costs the most time, such as calling `includes` on an array inside a loop. You find it and fix it first in the Better step.
- Bottom-up
- Dynamic programming with no recursion: you fill a table from the smallest subproblem upward, as in the fewest-bags table.
- Brute force
- The simplest correct solution, which tries every possibility. It is usually slow, but it proves you can solve the problem and gives you something to improve.
- Brute-force checker
- A slow but obviously correct function that you compare with your fast one on many random inputs. It finds bugs your hand-picked tests miss.
C
- Cache
- Fast memory that keeps recent answers so repeated reads skip the database. The cost is that data can be slightly out of date.
- Call stack
- The fixed-size space where JavaScript keeps each function call that is still waiting to finish. Very deep recursion overflows it and throws `RangeError: Maximum call stack size exceeded`.
- 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 at the end of a step to ask the interviewer a short question, such as 'Does that approach sound reasonable?' You do it per step, not after every line.
- Clarifying question
- A question that pins down what a problem means before you solve it, such as whether the input can be empty or has duplicates.
- Client
- The customer's browser or app, which sends requests to a system.
- Cliff
- A waiting period, often one year, before any equity vests. At the first anniversary a chunk (commonly a quarter) vests at once.
- Comparator
- A function passed to `sort` or a heap that says which of two items comes first, returning a negative number when `a` goes first. For numbers you write `(a, b) => a - b`, because the default sort compares as text.
- Competing offer
- An offer from another company. Mention a real one with its numbers if asked, and 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, 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 a competing offer.
- Cycle
- A linked list whose last node links back to an earlier one, so walking it never ends. Fast and slow pointers detect it because the fast one eventually meets the slow one.
D
- Data model
- The tables a system stores and their main columns. The order-tracking design has `orders` and `order_events` tables.
- Debrief
- The meeting after the loop where interviewers share notes and scores and decide whether to hire.
- Deep dive
- The part of a design round where you pick the hardest piece, or the one the interviewer asks about, and examine it in detail.
- Destructuring
- JavaScript syntax that copies the items of an array into separate variables, such as `const [row, col, steps] = item`. It also swaps two values: `[a, b] = [b, a]`.
- DFS (depth-first search)
- A search that follows one path as far as it can, usually by recursion, before backing up. It is used to flood-fill a grid and count islands.
- Directions
- A list of `[row change, column change]` pairs, such as `[1, 0]` and `[0, -1]`, used to visit a grid cell's four neighbors.
- DP table
- An array used in bottom-up dynamic programming, where `table[amount]` holds the answer for that subproblem. In the bag problem it is the fewest bags for `amount` lb.
- 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 its answer, either with a memo (top-down) or a table (bottom-up). It speeds up slow recursion like the fewest-bags example.
E
- Edge case
- An unusual input at the limits, such as an empty array or a single item, where code most often breaks.
- Edge-case checklist
- A list to run through after your main example: empty input, one item, two items, all the same, duplicates, zero or negatives, sorted or reversed, very large.
- Equity
- Part ownership of a company, usually given as RSUs or stock options, that becomes yours over time.
- ES modules
- JavaScript's standard way to share code between files with `import` and `export`. In Node you enable it with `{ "type": "module" }` in `package.json`.
- Exploding offer
- An offer that expires very soon, such as 'decide by tomorrow'. Politely ask for a few more days, since most companies agree.
- Exponential time
- Running time of O(2ⁿ), where the work doubles with every extra item. It is fine for about 20 items (a million steps) but far too slow for 50.
F
- Fast and slow pointers
- Walking a linked list with two references, one moving one node per step and one moving two. When the fast one reaches the end the slow one is at the middle, and if they meet there is a cycle.
- Flood fill
- Starting at one grid cell and spreading, like paint, to every connected cell of the same kind. It is used to count groups such as shelf blocks.
- Functional requirements
- Functional requirements say what a system does, such as customers seeing an order's status. Non-functional requirements say how well it does it: speed, uptime, scale and cost.
G
H
- Hash map lookup and counting
- Pattern 1: use a `Set` to ask 'have I seen this?' in O(1), or a `Map` to count how many of each item. It costs O(n) time and space.
- Heap for top k
- A heap keeps its smallest (or largest) item on top and costs O(log n) per push or pop. To find the k largest, keep a min-heap of only k items and pop the smallest whenever it grows past k, for O(n log k) time.
- Helper function
- A small function that does one job for a larger function and can be tested on its own. For example, `orderValue` hides the wholesale discount rule so the main loop reads like the problem.
- High-level design
- The boxes-and-arrows drawing of a system's main parts and how requests flow between them.
- Hint
- A nudge from the interviewer. Taking one well counts as communication: say how it changes your plan, then use it.
- Hiring committee
- At some large companies, a group that never met you and decides whether to hire from the interviewers' written feedback.
- HTTP methods (GET, POST)
- The verb at the start of an API call. `GET` reads data (`GET /orders/{id}/status`), and `POST` sends new data to the server (`POST /orders/{id}/events` records a new status).
I
- Idempotency key
- A unique id, such as the reminder id, passed to a service so that repeating the same request does not do the action twice. It stops a retried reminder email from being sent twice.
- In-bounds check
- Making sure a grid neighbor is actually on the grid before you read it, so you don't go off an edge.
- Infinity
- A built-in JavaScript number bigger than any other. In DP it starts as 'worse than any real answer', so the first real answer always beats it.
- Interval
- A range with a start and an end, stored as `[start, end]`. Two overlap when the second starts before the first ends.
- Island
- A group of connected cells of one kind in a grid, such as a block of shelves on the warehouse floor.
L
- Latency
- How long one request takes, measured in milliseconds.
- Leveling
- The company's judgment of which job level (junior, mid-level or senior) your interviews show. The same problem is scored with different expectations at each level.
- Linked list
- A chain of nodes where each node holds a value and a `next` link to the following node, like Alex's delivery route.
- Load balancer
- A component that spreads incoming requests across several web servers, so no single one is overloaded.
- Loop (onsite)
- The set of 2 to 5 back-to-back final interview rounds, held in person (onsite) or on video (virtual onsite).
M
- Memo
- A `Map` from each subproblem to its answer. Top-down DP checks it first and stores every answer before returning, so each subproblem is solved once.
- Merge intervals
- Pattern 13: sort the intervals by start, then join each one to the last when its start is at most the last end. It costs O(n log n).
- Message queue
- A waiting list of jobs, such as 'send this email', that a worker does later, with retries. A slow email service then doesn't slow down the packing station.
- Mock interview
- A full practice interview run under real conditions, with a timer and ideally a friend as the interviewer.
- Monotonic stack
- A stack kept in increasing (or decreasing) order as items are pushed, used to answer 'next bigger value' questions. It is a common follow-up technique to the basic stack pattern.
N
- Node.js
- A program that runs JavaScript outside a browser. You run a file with `node file.js`, and its built-in modules, such as `node:assert`, need no installation.
- node:test
- Node's built-in test runner, which needs no installing. You wrap checks in `test("name", () => {...})` in files named `*.test.js`, and the command `node --test` runs them all.
- Nullish coalescing (??)
- The `??` operator picks its right side only when the left is missing (`undefined` or `null`). `counts.get(x) ?? 0` starts a count at 0 the first time.
O
- Off-by-one error
- A bug where a count or index is wrong by exactly one, such as a window length of `right - left` instead of `right - left + 1`.
- Offer
- A company's proposal for your pay and terms. It usually comes by phone from the recruiter, then in writing.
- Online assessment
- A timed, auto-graded set of coding problems on a website that runs your code against hidden tests.
- Online judge
- A website that checks your code against hidden tests. It is good practice for the Code and Test steps.
- Overlapping subproblems
- The same smaller question coming up again and again, such as the fewest bags for 28 lb being reached by several routes. This is the sign that dynamic programming will help.
P
- package.json
- A file in your project folder. Containing `{ "type": "module" }`, it makes Node read `import` and `export`.
- Palindrome
- A word or code that reads the same backward, such as the coupon code `KC5225CK`.
- Path
- The partial answer a backtracking function is building. You save a copy of it, `[...path]`, when it is complete.
- Pattern
- A shape of solution that fits many problems, such as 'remember what you've seen in a set'. Signal words in the problem point to it.
- Pay range
- The lowest and highest pay a company plans for a role. Some laws require it in job postings.
- Pay-transparency law
- A law requiring a pay range in job postings. As of October 2026 several states, including Washington, California, Colorado and New York, have one.
- Practice log
- A table with one row per problem or mock: date, problem, pattern, time, whether you needed a hint, and one thing to remember.
- Prefix sum
- An array where `prefix[i]` is the total of the first `i` items. Any range total is then `prefix[end] - prefix[start]`, in O(1) after O(n) setup.
- Pruning
- Abandoning a backtracking branch as soon as it can't lead to a valid answer, such as when a gift box would go over budget.
- Pseudocode
- Plain-language steps written as comments before the real code. It shows the interviewer your plan and becomes your checklist.
Q
- Queue
- A first-in, first-out list in which items leave in the order they arrived. In JavaScript an array can work as one, using `push` to add at the back and `shift` to remove from the front, and breadth-first search (BFS) relies on it.
R
- Read replica
- A copy of the database that serves reads, taking load off the main database.
- README
- The first file a reviewer reads in a project. It says what the project does, how to run and test it, and the decisions and trade-offs you made.
- Recruiter
- The person who manages hiring for the company. They schedule your rounds, answer process questions and later discuss the offer; the recruiter screen is a short first call with no code.
- Reference comparison
- Arrays and objects are equal in `===` or a `Set` only if they are the very same object, not if they hold the same items. That is why grid cells are stored as strings like `"1,2"`.
- Referral
- An employee recommending you, which often gets your application read sooner.
- Refresher
- A new equity grant in a later year, offered at some companies.
- Requests per second
- How many requests a system receives each second. It is a key number in a back-of-the-envelope estimate.
- Requirements
- What a system must do (functional) and how well it must do it (non-functional). They are the first step of the design method.
- RSU (restricted stock unit)
- Equity given as shares you receive gradually as they vest. Large companies often use them.
- Rubric
- The form an interviewer fills in, listing the qualities 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.
- Seeded random numbers
- A sequence of 'random' numbers that is the same on every run, so a failing randomized test can be repeated. Because `Math.random` can't be seeded, a small generator such as `makeRandom(1)` is used instead.
- Shared editor
- An online editor, such as CoderPad, where the interviewer watches you code as you type. Some can run code and some can't.
- Sign-on bonus
- A one-time payment for joining. It's 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, as evidence about you. For coding rounds the four are problem solving, coding, communication and testing.
- Signal words
- Words in a problem, such as 'top k' or 'first repeated', that point to a pattern.
- 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 lone database.
- Slice copy
- A new array with the same items, made with `[...items]` or `items.slice()`. Use it so `sort` doesn't change the caller's array, and so backtracking saves a snapshot instead of the one array that keeps changing.
- Sliding window
- A run of neighboring items from `left` to `right` that moves along the array, with a running total updated as items enter and leave. A variable window grows with `right` and shrinks from `left` while over a limit.
- Sort first
- Pattern 2: sort the data so items that belong together become neighbors, for problems like 'closest' or 'group together'. It costs O(n log n).
- Spread syntax (...)
- The `...` in JavaScript spreads an array's items out one by one, as in `[...tickets]` to copy an array or `push(...rest)` to add many items at once.
- Stack
- A last-in, first-out list, here a plain array with `push` and `pop`. It suits 'most recent', undo and cancel-out problems, such as Alex's scanner.
- 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
- Situation, Task, Action, Result: a four-part shape for a behavioral story, with about 60% of the time on what you did.
- Stock option
- The right to buy company shares later at a fixed price. Startups often give these instead of RSUs.
- Story bank
- About six STAR stories, written out and practiced aloud, that between them cover most behavioral questions.
- Subproblem
- A smaller version of the same question, such as the fewest bags for 28 lb when solving for 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, usually about 45 minutes, where you plan a whole system out loud. It is scored on how you clarify, structure, reason about scale and weigh trade-offs.
T
- Take-home
- A small project you build on your own time, usually in 2 to 4 hours, 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, about 45 minutes, with one engineer in a shared editor and one or two problems.
- Test
- A `test(name, fn)` call whose asserts check one thing. More loosely, a plain test function groups several asserts and is run at the bottom of the file.
- Thinking aloud
- Saying what you're doing and why as you do it, so the interviewer can follow, score and steer your reasoning.
- Throughput
- How many requests a system handles per second.
- Timeboxing
- Sticking to the stated time for a task, such as a take-home's 2 hours. Going far over doesn't impress.
- Top-down
- Dynamic programming written as recursion plus a memo. It follows naturally from the brute force.
- Total compensation (TC)
- All of a year's pay added together: base, bonus, equity and sign-on. 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 track a dry run and spot bugs like an off-by-one.
- Trade-off
- What you give up for what you gain with a design choice. For example, a cache makes reads fast but the data can be a minute old.
- Trading space for time
- Using extra memory, such as a Set or Map, to make a solution faster. A Set makes each lookup O(1) at the cost of O(n) space.
- Tree recursion
- Pattern 6: 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).
- Two pointers
- Pattern 9: keep two indexes, `left` at the front and `right` at the back of a sorted array, and move one inward each step. It gives O(n) time and O(1) space.
V
- Vesting
- Equity becoming yours gradually, commonly over four years, rather than all at once.
- Virtual onsite
- A loop of interview rounds held on video rather than in person.
W
- Walk-away number
- The lowest total compensation you would accept, decided before any negotiation call. It keeps you calm because you know when to say no.
- Web server
- A program that takes a request from a client and returns a response. It runs your code, such as the order API.