← Bloomberg Interview Insights

Bloomberg·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Bloomberg SWE interview with a system design coding question focused on building a to-do list class from scratch. Pretty classic OOP design problem but with enough depth in the follow-ups to keep you on your toes.

Questions Asked (1)

Q1

Design a to-do list class with add, delete, get by id, and get all operations. An external helper tells you if an entry is completed. Pick your data structures, define the entry schema, and talk through thread safety and edge cases.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

I went straight for a hashmap keyed by id, which was the right call for O(1) lookups on get and delete.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a design using a hash map for O(1) access by ID and a list or ordered structure for retrieval. Discuss thread safety with synchronization or concurrent collections, and address edge cases like duplicate IDs, missing entries, and external completion status.

Pro tip: Demonstrate awareness of trade-offs by mentioning that the external helper for completion status could be a bottleneck, and suggest caching or lazy evaluation. Also, proactively discuss how to handle concurrent modifications during iteration.

1. Clarify Requirements and Constraints

Ask about expected scale, concurrency needs, and whether ordering matters. Confirm if IDs are unique and auto-generated or provided.

2. Define Entry Schema and Data Structures

Propose an Entry class with id, description, and other metadata. Choose a HashMap for O(1) access by ID and a concurrent structure like ConcurrentHashMap for thread safety, plus a list for ordered retrieval if needed.

3. Implement Core Operations

Describe add (generate ID, store entry), delete (remove by ID), get by ID (lookup), and get all (return collection). Discuss how to integrate the external completion helper, perhaps by calling it on retrieval or caching results.

4. Address Thread Safety

Explain synchronization strategies: use ConcurrentHashMap for thread-safe operations, or synchronize methods. Discuss atomicity for compound operations and potential race conditions.

5. Handle Edge Cases and Trade-offs

Cover duplicate IDs, missing entries, null inputs, and concurrent modifications. Discuss trade-offs between different data structures (e.g., HashMap vs TreeMap for ordering) and performance implications.

Key Points to Mention

  • Use of HashMap for O(1) average time complexity for add, delete, and get by ID.
  • Thread safety mechanisms: ConcurrentHashMap, synchronized blocks, or read-write locks.
  • Integration of external completion helper: lazy evaluation vs eager caching, and potential performance impact.
  • Edge cases: duplicate IDs, non-existent IDs, null values, and concurrent modification during iteration.
  • Trade-offs: memory overhead vs speed, ordering requirements, and scalability.
  • Consideration of immutability for Entry objects to ensure thread safety.

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