Got the Lyft offer, onsite had a query pagination design problem I hadn't seen before
Got the Lyft offer, onsite had a query pagination design problem I hadn't seen before
Just wrapped up my Lyft loop and got the offer, four rounds total, wanted to write up the onsite coding round since it's not a question I've seen come up here before.
Phone screen was one coding problem on their pad tool, nothing crazy but you write your own test cases, which honestly ate more time than the logic did.
Onsite coding was building a stateful query system over a list of transaction records, each one a flat list like timestamp, id, user, currency, amount. Needed to filter by a time window, an amount range, a specific user, and currency in any combination, then hand back matches sorted by timestamp through repeated page calls with a configurable chunk size, returning everything at once if nobody sets one. No test cases given, had to invent my own transactions to prove it worked, tracks with what people say about Lyft generally. Kept everything sorted upfront and applied the active filters as predicates while walking a pointer forward per call instead of rebuilding the list each time. Follow up asked about scaling past memory and what indexing would replace the linear scan under repeated filtering, I talked through time based partitioning but didn't land a fully clean answer.
System design was the donation platform one, focused on not losing or duplicating a payment during spikes, and behavioral was the standard conflict and failure stuff.
Offer came a little over a week later. If you get something like this, the pagination state is worth prepping, filtering itself is easy.
Lyft emmawilson 2d
did they want you to actually sketch out an index structure for the memory follow up or was talking through partitioning enough? that part sounds like the real filter tbh
Lyft ethanliu2831 OP 2d
mostly just wanted the reasoning out loud, I sketched a rough idea of partitioning by time bucket but never got to actual code for it
Lyft benhe98 1d
the write your own test cases thing seems pretty common for lyft rounds, ran into the same thing on my phone screen a while back
Lyft nehadesai0417 1d
congrats on the offer, this is a solid writeup
Lyft rohan.verma 1d
yeah I've seen a few people mention that same pattern, feels like it's more about time management than the actual problem
Lyft jacobmiller 20h
how long did you actually spend just writing test data vs solving it? curious how much time that ate into the round
Lyft quinn 15h
nice, congrats
Lyft vikramreddy1997 10h
anyone know if the sd donation platform question comes up for every onsite or just sometimes? seems to get mentioned a lot here
Replies (7)
how long did you actually spend just writing test data vs solving it? curious how much time that ate into the round
anyone know if the sd donation platform question comes up for every onsite or just sometimes? seems to get mentioned a lot here
congrats on the offer, this is a solid writeup
the write your own test cases thing seems pretty common for lyft rounds, ran into the same thing on my phone screen a while back
yeah I've seen a few people mention that same pattern, feels like it's more about time management than the actual problem
nice, congrats
did they want you to actually sketch out an index structure for the memory follow up or was talking through partitioning enough? that part sounds like the real filter tbh
mostly just wanted the reasoning out loud, I sketched a rough idea of partitioning by time bucket but never got to actual code for it
what was your phone screen question, if you don't mind me asking?