Lyft

Lyft Software Engineer Onsite Coding Questions

16+ questions from real Lyft Software Engineer Onsite Coding rounds, reported by candidates who interviewed there.

16
Questions
8
Topic Areas
10+
Sources

What does the Lyft Onsite Coding round test?

The Lyft onsite coding round is the core technical evaluation. Software Engineer candidates typically see 2-3 algorithm and data structure problems. Problems range from medium to hard difficulty, and interviewers evaluate both correctness and code quality.

Top Topics in This Round

Lyft Software Engineer Onsite Coding Questions

Part 1: https://leetcode.com/problems/meeting-rooms-ii * Part 2: Return a list of pair of (meeting, room) showing which meeting will be held in which room. E.g. given meetings [[0,30],[5,10],[15,20]], answer should be...

LeetCode #76: Minimum Window Substring. Difficulty: Hard. Topics: Hash Table, String, Sliding Window. Asked at Lyft in the last 6 months.

LeetCode #994: Rotting Oranges. Difficulty: Medium. Topics: Array, Breadth-First Search, Matrix. Asked at Lyft in the last 6 months.

LeetCode #158: Read N Characters Given read4 II - Call Multiple Times. Difficulty: Hard. Topics: Array, Simulation, Interactive. Asked at Lyft in the last 6 months.

LeetCode #981: Time Based Key-Value Store. Difficulty: Medium. Topics: Hash Table, String, Binary Search, Design. Asked at Lyft in the last 6 months.

LeetCode #17: Letter Combinations of a Phone Number. Difficulty: Medium. Topics: Hash Table, String, Backtracking. Asked at Lyft in the last 6 months.

## Problem You are given a list of ride records, each with a driver ID, a passenger rating (1-5), and a timestamp. Compute each driver's weighted average rating where more recent rides are weighted more heavily using exponential decay: `weight = exp(-lambda * days_since_ride)`. Return drivers ranked by weighted rating descending. ```python from datetime import datetime def rank_drivers( rides: list[dict], # {driver_id, rating, timestamp: datetime} as_of: datetime, decay_lambda: float = 0.01 ) -> list[tuple[str, float]]: # [(driver_id, weighted_rating), ...] pass ``` **Example:** ``` rides = [ {"driver_id": "D1", "rating": 5, "timestamp": datetime(2025,1,1)}, {"driver_id": "D1", "rating": 2, "timestamp": datetime(2025,3,1)}, {"driver_id": "D2", "rating": 4, "timestamp": datetime(2025,3,15)}, ] as_of = datetime(2025, 4, 1) # D1 recent low-rating pulls average down; D2 recent good rating wins ``` ## Follow-ups 1. What is the intuition behind exponential decay weighting, and how do you choose the decay constant? 2. How would you compute this efficiently in SQL using window functions instead of Python? 3. What edge case arises when a driver has only one ride, and how do you avoid ranking bias? 4. How would you extend this to also penalize drivers with fewer total rides (Bayesian smoothing)?

Implement an in-memory key-value database that supports transactions with `BEGIN`, `COMMIT`, and `ROLLBACK`. Build a command processor that reads and executes commands in order. The database is initi

## Problem: Job Scheduler (Min #Workers + Assignment History) You are given a set of jobs, each with a start time and a duration. You need to assign jobs to workers. A worker can handle at most one j

## Problem: Design an In-Memory Key-Value Store Design and implement an **in-memory key-value store** supporting: 1. `PUT key value`: bind string key `key` to string `value` (overwrite). 2. `GET key

## Problem: Implement an LRU Cache Implement an **LRU (Least Recently Used) cache** with capacity `capacity` supporting: - `get(key)`: If `key` exists, return its value and mark it as most recently

## Merge Intervals Given a list of intervals `intervals`, where each interval is `[start, end]` with `start <= end`. If two intervals overlap (i.e., their intersection is non-empty), merge them into

Given a string `s` and a string `t`, return the minimum window in `s` which will contain all the characters in `t`. If there is no such window in `s` that covers all characters in `t`, return an empty

Based on 'Word Ladder' (LeetCode 127), design an algorithm to return all shortest paths, not just the path length. You must transform beginWord into endWord by changing one letter at a time, and each

You are given an integer array `prices` where `prices[i]` is the price of a given stock on the `ith` day. Design an algorithm to find the maximum profit. You may complete at most `k` transactions. Not

Design a Web Crawler system consisting of 100 bots that cannot communicate directly with Lyft's internal infrastructure. All communication must pass through a primary node. Implement a crawler schedul

What to Expect in the Lyft Onsite Coding Round

The Lyft Software Engineer Onsite Coding round has a specific calibration purpose distinct from other rounds in the loop. Across 16+ verified reports on LeakCode for this exact round type, the consistent expectations: clear scoping of the problem before diving into a solution, explicit reasoning about complexity, structured handling of edge cases, and the ability to discuss trade-offs between two reasonable approaches.

Reports tagged with the Onsite Coding round at Lyft show recurring patterns in difficulty and topic distribution. The Onsite Coding round is typically 45-60 minutes; the interviewer is calibrated against a specific rubric. The discriminator between candidates who advance and candidates who do not is rarely the final correctness of the answer. It is the path: did you clarify, did you verbalize your approach, did you handle edge cases, and did you communicate throughout.

How To Prepare for This Specific Round

Filter the questions below to the most recent reports (past 6-12 months). Questions tagged for this exact round type from this exact company at this exact role level are the highest-signal data available. Older reports may reference questions that have since rotated out of the company's pool.

Practice 4-6 representative problems from this set under timed conditions. The goal is not memorization (companies rotate questions); the goal is to internalize the patterns the interviewer typically reaches for and the depth of follow-up to expect. Reports on LeakCode also tag the typical follow-up depth at this round type, which is the discriminating signal between hire and no-hire calibration.

Onsite Coding Round Timing and Format

The Onsite Coding round at Lyft typically runs 45-60 minutes. Use the first 2-3 minutes to clarify requirements; you should never start coding or designing without verifying the input/output format, constraints, and edge cases out loud. Use the next 5-7 minutes to verbalize your approach before writing any code. The middle 20-30 minutes are implementation. Reserve the final 10 minutes for testing with concrete examples and discussing optimization or trade-offs.

Time budget discipline is one of the most reliable senior-vs-junior discriminators in this round. Strong candidates verbalize where they are in their budget out loud ("I've used about 20 minutes, I have 15 minutes left for testing and one optimization"). This signals engineering maturity to the interviewer and creates positive feedback they can capture in writing.

Common Failure Modes in This Round

Reports tagged "no hire" at Lyft Software Engineer Onsite Coding commonly cite: coding silently without verbalizing approach, jumping to implementation before clarifying requirements, missing edge cases (empty input, single element, very large input), producing working code that the candidate cannot refactor when asked, and failing to test their solution with concrete examples before declaring done.

The single most predictive failure mode in 2025-2026 reports: not asking clarifying questions. Interviewers at all FAANG companies are explicitly trained to weight this dimension. Strong candidates ask 3-5 clarifying questions even on problems that look obvious; weak candidates dive into code immediately. The clarifying-question check is often the first signal recorded in the interviewer's notes.

See All 16 Questions from This Round

Full question text, answer context, and frequency data for subscribers.

Get Access