InterviewLegend

Windows, Scans & Intervals

Alex Chen45 min readUpdated 548 real interview reports

Uber's array questions often start with a nested loop that already works. You walk out from every point until you hit a blocker, recompute the max and min of every stretch, or square everything and sort. Each version passes the sample. Then the interviewer asks for the linear version and adds a twist on top. Expect to give the brute force and its cost first, then the faster version, with time and space at each step.

None of the first three problems needs an unusual data structure. Each fast answer keeps one value alive across the pass instead of recomputing it for every element, like the position of the last blocker you passed, the current max and min held at the front of two deques, or the next-smallest absolute value on each side of zero. Name that value before you code and the loop is easy to write. The interval problems that follow use the same single pass after one sort by start time.

UberPremium lesson · Coding round

The 5 Uber problems are below.

  1. A Premium questionCoding · Medium · Signature problem
  2. A Premium questionCoding · Medium · Frequently asked
  3. 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.

Had your Uber interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Uber interview guide

Know what Uber asks before you walk in.

30 coding · 4 system design · 21 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.