← eBay Interview Insights

eBay·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
May 2026

Summary

eBay SWE interview with a pretty involved OOP/system design coding question. The problem looked like a straightforward file system at first but kept expanding with users, capacity limits, compression, and copying. Took more mental bandwidth than I expected for a single session.

Questions Asked (1)

Q1

Design an in-memory file system class that supports adding, deleting, listing, and searching files, managing per-user storage capacity, copying files, and compressing/decompressing files.

System DesignAlgorithms & Data StructuresData Modeling
Author's notes

This one kept growing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then design a class with a tree-based directory structure and a map for file metadata. Implement core operations (add, delete, list, search) first, then extend to per-user quotas, copy, and compression. Discuss trade-offs and potential optimizations.

Pro tip: Demonstrate awareness of concurrency and scalability by mentioning thread-safety and sharding, even if not explicitly asked. This shows you think beyond basic functionality.

1. Clarify Requirements and Constraints

Ask about expected scale, file size limits, user count, and whether operations need to be thread-safe. Clarify if compression is per-file or per-directory, and if search is by name or content.

2. Design Data Structures

Propose a tree structure for directories and files, with nodes storing metadata (name, size, owner, compressed flag). Use a map for quick file lookup by path and a separate map for user quotas.

3. Implement Core Operations

Outline methods for adding, deleting, listing, and searching files. For search, consider BFS/DFS or maintaining an index. Ensure operations update user storage usage.

4. Handle Advanced Features

Explain how to implement copy (deep copy of file data and metadata) and compression/decompression (using algorithms like gzip, updating size and quota accordingly).

5. Discuss Trade-offs and Optimizations

Talk about time/space complexity, potential bottlenecks (e.g., search), and optimizations like caching, lazy deletion, or concurrent data structures.

Key Points to Mention

  • Tree-based directory structure with nodes for files and directories
  • Per-user storage quota tracking and enforcement
  • Efficient search strategies (e.g., indexing, BFS/DFS)
  • Copy semantics: deep vs shallow copy, handling large files
  • Compression algorithms and impact on storage and access time
  • Thread-safety and concurrency considerations for multi-user access

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