← The Trade Desk Interview Insights

The Trade Desk·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Did a coding round for a Software Engineer role at Tradedesk focused on designing a basic cloud storage system. Nothing too wild, but the edge cases kept piling up faster than I expected.

Questions Asked (1)

Q1

Design a basic cloud storage system with support for adding files, copying files, and retrieving file sizes. Add should fail if the file already exists, copy should fail if the source is missing or the destination already exists, and size lookup should return nothing if the file isn't found.

System DesignAlgorithms & Data StructuresAPI & Integrations
Author's notes

Started fine with a simple hashmap for storing file names and sizes.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a simple in-memory hash map design that maps file names to their contents or sizes. Walk through the API operations (add, copy, getSize) with clear error handling for each case, and discuss potential extensions like persistence or concurrency.

Pro tip: Demonstrate awareness of edge cases like empty file names, large files, and concurrent access, and suggest how to handle them without overcomplicating the initial design.

1. Clarify Requirements

Ask questions to confirm assumptions: Are file names case-sensitive? Is there a size limit? Should operations be thread-safe? This shows you think before coding.

2. Choose Data Structures

Propose a hash map (dictionary) to store file metadata, mapping file names to their sizes or contents. Discuss trade-offs of storing contents vs. references.

3. Define API and Error Handling

Outline the methods: addFile(name, content), copyFile(source, dest), getFileSize(name). Specify return values or exceptions for each error condition (e.g., throw exception or return false).

4. Walk Through Operations

Step through each operation with examples, covering success and failure cases. For copy, ensure atomicity: check source exists and destination doesn't before copying.

5. Discuss Extensions and Trade-offs

Mention potential improvements: persistence, concurrency control, scalability, and alternative designs like using a database or distributed storage.

Key Points to Mention

  • Use a hash map for O(1) average time complexity for add, copy, and size lookup.
  • Error handling: add fails if file exists; copy fails if source missing or destination exists; size returns null/None if not found.
  • Atomicity in copy: check both conditions before performing the copy to avoid partial state.
  • Concurrency: consider thread safety with locks or concurrent data structures if needed.
  • Memory management: discuss implications of storing file contents in memory vs. metadata only.
  • Scalability: how the design would change for large-scale distributed storage.

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