Track the First Unique Restaurant in a Stream

Quick Overview

Track integer restaurant IDs in arrival order and answer each query with the earliest value seen exactly once so far, or `-1` when no unique value remains.

Track the First Unique Restaurant in a Stream

Company: DoorDash

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Track integer restaurant IDs in arrival order and answer each query with the earliest value seen exactly once so far, or `-1` when no unique value remains.

Read the full DoorDash Software Engineer interview experience this question came from

DoorDash logo
DoorDash
May 26, 2026
mediumSoftware EngineerOnsiteCoding & Algorithms
6
0
Loading...