← Tradedesk Interview Insights

Tradedesk·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Did a coding round for a Software Engineer role at Tradedesk that was basically a cloud storage simulation problem. Pretty straightforward Level 1 stuff but the edge cases in the spec are where things get interesting.

Questions Asked (1)

Q1

Design and implement a basic cloud storage system with three operations: adding a file (should return false if the file already exists), copying a file (should fail if the source doesn't exist or the destination already exists), and retrieving a file's size (should return null/None if the file isn't found).

System DesignAlgorithms & Data StructuresAPI & Integrations
Author's notes

The add and get_file_size parts were pretty quick to knock out.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and edge cases, then propose a simple hash map-based design that maps file names to sizes, ensuring O(1) operations. Implement the three operations with careful handling of preconditions and return values, and discuss potential extensions like concurrency and scalability.

Pro tip: Demonstrate maturity by proactively discussing trade-offs (e.g., memory vs. disk storage) and mentioning how you would test edge cases like duplicate adds, missing sources, and concurrent access.

1. Clarify Requirements

Ask questions to confirm assumptions: Are file names unique? Should operations be thread-safe? What is the expected scale? This shows you think before coding.

2. Design Data Structure

Propose using a hash map (dictionary) to store file names as keys and sizes as values, enabling O(1) average-case time for add, copy, and get operations.

3. Implement Operations

Write pseudocode or actual code for each operation, handling edge cases: add returns false if key exists; copy checks source exists and destination doesn't; get returns null if key missing.

4. Analyze Complexity

State that all operations are O(1) time and O(n) space for n files, and discuss potential improvements like using a trie for prefix searches or a database for persistence.

5. Discuss Extensions

Mention how to handle concurrency (locks, concurrent data structures), persistence (write to disk), and scalability (sharding, distributed storage) if the interviewer probes further.

Key Points to Mention

  • Use a hash map for O(1) average-case time complexity for all operations.
  • Handle edge cases: duplicate add, missing source in copy, existing destination in copy, and missing file in get.
  • Return values must match specification: false for duplicate add, failure for invalid copy, null for missing file.
  • Consider thread safety with locks or concurrent data structures if multiple threads access the system.
  • Discuss trade-offs between in-memory storage and persistent storage (e.g., disk, database).
  • Mention testing strategies: unit tests for each operation and edge case, and integration tests for concurrent scenarios.

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