← Google Interview Insights

Google·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Google SWE interview with a classic linked list reversal problem. Nothing fancy, just you and a whiteboard and a question you've seen a hundred times but somehow still manage to second-guess yourself on.

Questions Asked (1)

Q1

Reverse a linked list.

Algorithms & Data Structures
Author's notes

Knew it the second they said it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem constraints (iterative vs recursive, in-place, etc.) and then walk through the iterative two-pointer approach with a diagram. Emphasize edge cases and complexity analysis, and if time permits, mention the recursive alternative.

Pro tip: Demonstrate strong communication by thinking aloud and drawing the list on a whiteboard; this shows Google you can collaborate and reason visually, not just code.

1. Clarify requirements and constraints

Ask if the list is singly or doubly linked, if it should be reversed in-place, and if recursion is allowed. Confirm the function signature and return type.

2. Explain the iterative approach

Describe using three pointers: prev, curr, and next. Walk through the process of reversing the links one by one until curr becomes null.

3. Handle edge cases

Mention empty list, single node, and two nodes. Ensure your solution handles these without errors.

4. Analyze time and space complexity

State that the iterative solution runs in O(n) time and O(1) space. For recursive, O(n) time and O(n) space due to call stack.

5. Optionally discuss recursive solution

If asked or if time permits, briefly explain the recursive approach: reverse the rest of the list and adjust pointers. Highlight trade-offs.

Key Points to Mention

  • Three-pointer technique (prev, curr, next) for iterative reversal
  • Edge cases: empty list, single node, two nodes
  • Time complexity O(n) and space complexity O(1) for iterative
  • Recursive alternative with O(n) space due to call stack
  • In-place reversal without creating new nodes
  • Importance of updating pointers in correct order to avoid losing nodes

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.