Lyft

Lyft Software Engineer Onsite Coding Questions

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

7
Questions
6
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)?

See All 7 Questions from This Round

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

Get Access