← Dropbox Interview Insights

Dropbox·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Apr 2026

Summary

Dropbox software engineer interview with a coding round focused on building a small in-memory banking system from scratch. Pretty straightforward on the surface but the edge cases piled up fast.

Questions Asked (1)

Q1

Design and implement a basic in-memory bank system that supports creating accounts, depositing money, and transferring funds between accounts. The system should reject operations on accounts that don't exist and transfers where the source account has insufficient funds.

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

Started confident, wrote createAccount and deposit pretty quickly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and defining the core data model (Account with ID and balance) and operations (create, deposit, transfer). Then outline a simple in-memory implementation using a hash map for O(1) account lookup, and discuss error handling for invalid accounts and insufficient funds. Finally, consider trade-offs like concurrency, persistence, and scalability to show depth.

Pro tip: Mention that you would use a lock or transactional mechanism to ensure atomicity in transfers, especially if the system might be accessed concurrently. This shows awareness of real-world banking systems and prevents race conditions.

1. Clarify requirements and constraints

Ask about expected scale, concurrency needs, persistence requirements, and whether operations need to be atomic. Confirm the exact operations and error conditions.

2. Design the data model and API

Define an Account class with unique ID and balance, and specify method signatures for createAccount, deposit, and transfer. Decide on return types and error handling (exceptions vs. result objects).

3. Implement core logic with a hash map

Use a hash map (e.g., HashMap in Java, dict in Python) to store accounts by ID for O(1) lookup. Implement deposit and transfer with checks for account existence and sufficient funds.

4. Address concurrency and atomicity

Discuss how to make transfers atomic and thread-safe, e.g., using locks, synchronized methods, or transactional memory. Mention potential deadlocks and how to avoid them (e.g., ordering locks).

5. Discuss trade-offs and extensions

Talk about limitations of in-memory storage (no persistence, limited by RAM) and possible extensions like persistence, distributed systems, and idempotency for transfers.

Key Points to Mention

  • Use a hash map for O(1) account lookup by ID.
  • Validate account existence before deposit or transfer.
  • Check sufficient funds before transfer and ensure atomicity.
  • Consider thread safety with locks or synchronized methods.
  • Discuss error handling strategies (exceptions vs. error codes).
  • Mention trade-offs: in-memory vs. persistent storage, scalability, and concurrency overhead.

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