DoorDash·Software Engineer·Onsite - System Design / Architecture
- Design an image carousel that supports forward/backward cycling and autoplay with a configurable interval. Walk through the data structures, APIs, and time/space complexity.
- Design a per-image comment thread with full create, read, edit, and delete support. What APIs do you expose, including pagination?
- Support upvoting and downvoting on comments and return the top-k comments per image ordered by score, with ties broken by recency. Design the data structures for this at scale (up to 100k images and 1 million comments).
- How do you prevent double-counting when a user rapidly toggles votes on a comment?
“The carousel mechanics themselves weren't the hard part.”