PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/DoorDash

Implement image carousel with comments and upvotes

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's ability to design scalable data structures and efficient algorithms for interactive features, including API design, pagination, and consistency/concurrency handling for upvotes and per-image comment threads.

  • Medium
  • DoorDash
  • Coding & Algorithms
  • Software Engineer

Implement image carousel with comments and upvotes

Company: DoorDash

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

Implement an image carousel that supports: 1) cycling forward/backward and autoplay with a configurable interval; 2) a per-image comment thread with create/read/edit/delete; 3) upvoting/downvoting comments and returning the top-k comments per image ordered by score, breaking ties by recency. Design the data structures to support add/delete comment, update vote, and query top-k efficiently at scale (up to 10^5 images and 10^6 comments across images). Specify the time/space complexities, the APIs you would expose (including pagination of comments), and how you would prevent double-counting when a user rapidly toggles votes.

Quick Answer: This question evaluates a candidate's ability to design scalable data structures and efficient algorithms for interactive features, including API design, pagination, and consistency/concurrency handling for upvotes and per-image comment threads.

Related Interview Questions

  • Maximize Chef Assignment Profit - DoorDash (medium)
  • Compute Courier Delivery Pay - DoorDash (easy)
  • Compute Nearest Destination Distances - DoorDash (easy)
  • Compute Driver Pay with Double-Pay Windows - DoorDash (medium)
  • Count changed nodes between two menu trees - DoorDash (hard)
DoorDash logo
DoorDash
Sep 6, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
3
0

Implement an image carousel that supports:

  1. cycling forward/backward and autoplay with a configurable interval;
  2. a per-image comment thread with create/read/edit/delete;
  3. upvoting/downvoting comments and returning the top-k comments per image ordered by score, breaking ties by recency. Design the data structures to support add/delete comment, update vote, and query top-k efficiently at scale (up to 10^5 images and 10^6 comments across images). Specify the time/space complexities, the APIs you would expose (including pagination of comments), and how you would prevent double-counting when a user rapidly toggles votes.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More DoorDash•More Software Engineer•DoorDash Software Engineer•DoorDash Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.