InterviewLegend

Stacks and Iterators

Alex Chen35 min readUpdated 86 real interview reports

Lyft's phone screen often uses small problems with a stack or a cursor inside. One of the three here is the one candidates mention most, and it has been handed out as a stub with test cases already sitting in the shared pad.

The other two are shorter class builds. You'll have time to run all three.

Both of those are classes, so before you write a method, say what each call is allowed to assume. Keep whatever a later call needs next to the data, so no call has to search, and when a search can't be avoided, do it once and keep the result.

All three run against the same tests in Python, JavaScript, C++, Java, Go and Ruby. Feed each one repeated values before you trust it, since a repeated value breaks a lot of first drafts.

LyftPremium lesson · Coding round

The 3 Lyft problems are below.

  1. A Premium questionCoding · Medium · Signature problem
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Medium

Each with hints, the follow-up and a tested solution.

Get the Lyft questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

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

Know what Lyft asks before you walk in.

28 coding · 2 system design · 12 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.