Design Data Structures
In these problems you build a small class whose methods get called one at a time, and each call needs its answer before the next one arrives, the way a rider who requests a car gets an answer right away. They come up in Uber's coding rounds, between the phone screens and the machine-coding round. The first three are online classes: one for bookings, one for counts over a time window that keeps sliding forward, and one for a stream of visitors. The last two are machine-coding classics, a cache and a running median.
Most of them have a batch version you probably know, where you see the whole input before you answer. An online class can't do that. So start by writing down each method and the cost it has to hit, then ask what state lets the slowest method meet it. You're choosing building blocks, usually a hash map plus one more structure. Once the class works, expect practical follow-ups like a cancel method, a rate limiter built on top, thread safety or a different eviction rule.
UberPremium lesson · Coding round
The 5 Uber problems are below.
- A Premium questionCoding · Hard · Signature problem
- A Premium questionCoding · Medium · Signature problem
- A Premium questionCoding · Medium · Frequently asked
+ 2 more in this lesson
Each with hints, the follow-up and a tested solution.
Get the Uber questions$49 a year · all 100 companies · cancel anytime
From 548 Uber reports, forum threads behind logins and write-ups in Chinese.
Uber interview guideKnow what Uber asks before you walk in.
30 coding · 4 system design · 21 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.