Practice · 50 questions

Developer interview questions, answered

The questions that come up in almost every frontend, backend and full-stack round. For each: what the interviewer is really checking, the answer, the line to say in the room, the follow-up they'll ask next, and the trap to avoid.

Your progress0 of 50 done · saved on this device

JavaScript

The language questions every frontend and full-stack round opens with.

  1. 1What is a closure?
  2. 2How does the event loop work? In what order do setTimeout and a Promise run?
  3. 3How is `this` decided in JavaScript?
  4. 4What is hoisting? What is the difference between var, let and const?
  5. 5Promises or async/await? How do you handle errors, and run things in parallel?
  6. 6What is the difference between == and ===?
  7. 7What is the difference between debounce and throttle? Write debounce.
  8. 8What is the difference between a shallow copy and a deep copy?

The browser and React

What happens between the server and the pixels.

  1. 9What happens when you type a URL into the browser and press Enter?
  2. 10What is the difference between reflow and repaint? Why is layout thrashing slow?
  3. 11How does React decide what to re-render? Why do list items need keys?
  4. 12useEffect, useMemo, useCallback: when do you use each?
  5. 13What is CORS, and how do you fix a CORS error?
  6. 14Cookies, localStorage or sessionStorage: where do you keep an auth token?

Backend and APIs

How services talk safely, and what to do when they fail.

  1. 15REST or GraphQL: when would you pick each?
  2. 16What is idempotency, and why do payment APIs need idempotency keys?
  3. 17What is the difference between authentication and authorization? And 401 against 403?
  4. 18JWT or session cookies?
  5. 19How would you rate-limit an API?
  6. 20How do you make webhooks reliable?
  7. 21Which HTTP status codes should every backend developer know?

Databases

Indexes, transactions and the bugs that only show up under load.

  1. 22How does a database index work, and when is it not used?
  2. 23What are ACID transactions?
  3. 24What are isolation levels? Dirty reads, non-repeatable reads and phantoms.
  4. 25SQL or NoSQL: how do you choose?
  5. 26What is the N+1 query problem?
  6. 27What is the difference between replication and sharding?
  7. 28Optimistic or pessimistic locking?

OS, networking and concurrency

The fundamentals interviewers use to see how deep you go.

  1. 29What is the difference between a process and a thread?
  2. 30What is a deadlock, and how do you prevent one?
  3. 31What is the difference between TCP and UDP?
  4. 32How does DNS resolution work?
  5. 33What is a race condition? Give an example and a fix.
  6. 34What changed from HTTP/1.1 to HTTP/2 and HTTP/3?

Data structures and patterns

The structures behind the coding round, and the patterns that crack it.

  1. 35How does a HashMap work inside?
  2. 36Array or linked list?
  3. 37Stack or queue? Where are they used?
  4. 38How does binary search work, and when can you use it?
  5. 39When do you use two pointers or a sliding window?
  6. 40BFS or DFS?
  7. 41What is a heap? How do you find the top K items?
  8. 42Design an LRU cache.

System design

The building blocks, then three classic designs end to end.

  1. 43What does a load balancer do? Layer 4 or layer 7, and which algorithms?
  2. 44How do you design caching? Cache-aside, invalidation, stampedes.
  3. 45Explain the CAP theorem with a real example.
  4. 46Why use a message queue? What do at-least-once delivery and idempotent consumers mean?
  5. 47Design a URL shortener.
  6. 48What is consistent hashing?
  7. 49Design a notification system: email, SMS and push.
  8. 50Design a chat app like WhatsApp, for one-to-one messages.