Code Review16 min read

15 Code Review Interview Questions for Software Engineers

15 realistic code review interview scenarios covering N+1 queries, race conditions, memory leaks, unhandled promises, authorization bugs, and poor TypeScript design.

Pairlet TeamPublished: 2026-09-08

Code review exercises provide immediate signal on how candidates inspect code for bugs, edge cases, and architectural flaws. Here are 15 realistic code review interview scenarios complete with what interviewers should look for.

Scenario 1: Database N+1 Query Anti-Pattern

javascriptPairlet Snippet
// Flawed Pull Request:
async function getUsersWithOrders(userIds) {
  const users = [];
  for (const id of userIds) {
    const user = await db.query('SELECT * FROM users WHERE id = $1', [id]);
    const orders = await db.query('SELECT * FROM orders WHERE user_id = $1', [id]);
    users.push({ ...user, orders });
  }
  return users;
}
```
- **What to look for**: Candidate identifies N+1 database roundtrips and refactors using SQL `IN (...)` clauses or batch JOIN queries.

Scenario 2: Swallowed Async Exceptions

javascriptPairlet Snippet
// Flawed Pull Request:
async function processPayment(payment) {
  try {
    await stripe.charges.create(payment);
    await auditLogger.log(payment.id);
  } catch (err) {
    console.log("Something went wrong");
    return true; // Returns success despite failure!
  }
}
```
- **What to look for**: Candidate catches the silent error swallowing and false positive return value.

Scenario 3: Node.js Memory Leak via Global Listeners

---

Practice Code Review Exercises Live Run live code review interview loops with candidates in a free collaborative workspace. [Create a Pairlet Interview Room](https://www.pairlet.dev/interview/new).

Frequently Asked Questions

What categories of bugs work best in code review exercises?

Database performance (N+1 queries), Async error swallowing, Authorization checking bypasses, Node.js memory leaks, and Unrestricted Promise concurrency.

Practice Relevant Coding Problems
Practice Live Coding

Conduct Live Coding Interviews with Zero Friction

No candidate sign-up required. Create an instant room, share the link, and code together in real time with shared code execution.

Related Articles