← Bloomberg Interview Insights

Bloomberg·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Bloomberg coding round, one question the whole time. The problem was a linked list addition variant and they wanted two different approaches, so it wasn't just 'write the code and leave.' Felt okay about it but never heard back on outcome.

Questions Asked (1)

Q1

You have two linked lists where each node holds a single digit, most significant digit first. Add the two numbers they represent and return the result as a linked list. Walk through at least two approaches.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

The two-approach requirement is what tripped me up a little.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem constraints (e.g., list lengths, digit values, whether leading zeros are allowed) and then present two approaches: first, a straightforward method using stacks to reverse the lists and perform addition, and second, an optimized approach using recursion to handle the addition from the least significant digit without extra space. Discuss trade-offs in time/space complexity and edge cases.

Pro tip: Mention that in a real interview, you'd first ask if the input lists can be modified or if extra space is allowed, as this determines the best approach. Also, highlight that Bloomberg values clean, efficient code and clear communication of trade-offs.

1. Clarify requirements and edge cases

Ask about list lengths, digit values (0-9), leading zeros, and whether the input lists can be modified. Discuss handling of empty lists and carry beyond the most significant digit.

2. Approach 1: Using stacks

Push all digits from both lists onto separate stacks, then pop and add digits while managing carry. Build the result list by appending new nodes at the head or tail, ensuring the most significant digit is first.

3. Approach 2: Using recursion

Recursively traverse both lists to the end, then add digits on the way back up, propagating carry. Handle different list lengths by treating missing nodes as zero, and create result nodes as you return.

4. Compare trade-offs

Discuss time and space complexity: both approaches are O(n) time, but stacks use O(n) extra space while recursion uses O(n) stack space. Mention that recursion may cause stack overflow for very long lists, while stacks are more explicit.

5. Walk through an example and code

Choose a simple example (e.g., 123 + 456) and trace through both approaches. Then write clean code for one approach, handling edge cases like carry at the end.

Key Points to Mention

  • Time complexity: O(max(m, n)) where m and n are list lengths.
  • Space complexity: O(m+n) for stacks, O(max(m, n)) for recursion due to call stack.
  • Handling carry propagation, including a final carry that creates a new node.
  • Edge cases: empty lists, lists of different lengths, all 9s, leading zeros.
  • Trade-off between iterative (stacks) and recursive solutions in terms of readability and memory.
  • Potential follow-up: optimize to O(1) space if lists can be reversed or if we use two pointers with length difference.

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