← DoorDash Interview Insights

DoorDash·Frontend Engineer·Onsite - Coding / Algorithms·Intermediate

Intermediate
Jun 2026

Summary

DoorDash frontend coding round, building on top of a phone-screen project. Three features to implement in TypeScript and the whole thing felt more like a real work task than a typical interview, which I appreciated but also underestimated.

Questions Asked (3)

Q1

Add three filter buttons to an existing list page where the filter values come from an API response. How do you wire up the state and handle the data flow?

API & IntegrationsTechnical Trade-offs
Author's notes

This part felt straightforward at first but I spent way too long deciding where to put the filter state.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: are the filters single-select or multi-select, and should they combine with AND/OR logic? Then describe a state management approach that separates filter options (from API) from selected filter values (UI state), and explain how to trigger data refetches when selections change.

Pro tip: Mention that you'd debounce or batch filter changes to avoid unnecessary API calls, and consider using URL query parameters to make filter state shareable and bookmarkable—this shows you think about user experience and performance beyond the basic implementation.

1. Clarify requirements and data shape

Ask whether filters are single or multi-select, how they combine (AND/OR), and what the API response looks like for filter options and filtered results.

2. Design state structure

Separate filter options (fetched once) from selected filter values (local UI state). Use a state management solution like React's useState/useReducer or a store like Redux/Zustand.

3. Fetch filter options and render buttons

Fetch filter options from the API on mount, handle loading/error states, and render three filter buttons dynamically based on the response.

4. Handle selection and trigger data refetch

On button click, update selected filter state and trigger a refetch of the list data with the new filter parameters, using debouncing or batching to optimize.

5. Sync with URL and handle edge cases

Optionally sync filter state to URL query params for shareability, and handle edge cases like empty results, API errors, and clearing filters.

Key Points to Mention

  • Separation of concerns: filter options (server state) vs. selected filters (client state)
  • Data fetching strategy: use React Query/SWR or similar for caching and automatic refetch on filter change
  • Debouncing or batching filter changes to avoid excessive API calls
  • URL synchronization for shareable/bookmarkable filter states
  • Loading and error states for both filter options and filtered results
  • Accessibility considerations for filter buttons (e.g., aria-pressed, keyboard navigation)

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

Q2

Implement a tag-based filtering category that supports multi-tag selection. You need to decide on AND vs OR semantics and justify the choice.

Technical Trade-offsAPI & Integrations
Author's notes

The AND/OR decision was the interesting bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the use case and user expectations, then propose a hybrid approach that defaults to OR for discovery but allows AND for refinement. Justify the choice by weighing user intent, performance, and scalability, and outline how you'd implement it with a clean API.

Pro tip: Mention that you'd make the semantics configurable via a prop or query parameter, and discuss how you'd handle edge cases like empty selections or conflicting tags. This shows you think about real-world flexibility and robustness.

1. Clarify Requirements

Ask questions to understand the context: Is this for filtering search results, browsing categories, or refining a list? What are the expected user behaviors and data volumes?

2. Evaluate Trade-offs

Compare AND vs OR semantics: AND gives precise results but may return too few items; OR gives broad results but may include irrelevant items. Consider user intent (exploration vs. specific search) and performance implications.

3. Propose a Solution

Recommend a default (e.g., OR for discovery, AND for refinement) and justify it. Suggest making it configurable to adapt to different scenarios.

4. Outline Implementation

Describe the API design (e.g., a component prop or query param), data flow, and how you'd handle state management and performance optimizations like memoization or server-side filtering.

5. Discuss Edge Cases

Address scenarios like no tags selected, conflicting tags, and how to communicate results to users (e.g., showing counts or empty states).

Key Points to Mention

  • User intent: OR for broad discovery, AND for precise filtering
  • Performance: OR may require more data fetching; AND can be optimized with indexes
  • Scalability: Consider how the approach handles a growing number of tags
  • API design: Make semantics configurable via props or query parameters
  • Edge cases: Empty selection, conflicting tags, and user feedback
  • Real-world examples: How DoorDash might use this for cuisine filters or dietary restrictions

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

Q3

Build a 'See More' / 'See Less' toggle that expands a truncated list and collapses it back. Make sure the component structure is clean and the interaction is accessible.

Technical Trade-offsSystem Design
Author's notes

Probably the easiest of the three.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (e.g., number of items to show initially, whether the list is static or dynamic) and then outline a clean component structure with a parent managing state and a child rendering the list. Focus on accessibility by using a button with aria-expanded and aria-controls, and ensure the toggle is keyboard operable and screen-reader friendly.

Pro tip: Mention that you would use a <button> element for the toggle to get native keyboard and screen reader support, and consider using CSS to hide/show items rather than removing them from the DOM to maintain focus and state.

1. Clarify requirements and constraints

Ask about the expected number of items, whether the list is static or fetched, and if there are any design specs for the toggle. This shows you think before coding.

2. Design component structure

Propose a parent component that holds the expanded state and a child list component that receives items and expanded as props. Keep the toggle button as a separate reusable component if needed.

3. Implement state and toggle logic

Use useState (or equivalent) to track expanded/collapsed. Derive the visible items by slicing the array based on the expanded state and a configurable limit.

4. Ensure accessibility

Use a <button> with aria-expanded and aria-controls pointing to the list ID. Ensure the button text clearly indicates action (e.g., 'See more' vs 'See less') and that focus remains on the button after toggle.

5. Consider edge cases and performance

Discuss handling empty lists, dynamic updates, and potential performance issues with large lists (e.g., virtualization). Mention that toggling should not cause layout shifts that disorient users.

Key Points to Mention

  • Use of semantic HTML: <button> for toggle, <ul>/<li> for list.
  • ARIA attributes: aria-expanded, aria-controls, and possibly aria-hidden on hidden items.
  • State management: local state with useState, lifting state up if needed.
  • Keyboard accessibility: toggle should be focusable and operable via Enter/Space.
  • Screen reader announcements: ensure the change in state is communicated, possibly with aria-live.
  • Performance: avoid re-rendering the entire list unnecessarily; use memoization if needed.

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