Grid Infection Spread Time
Asked at Lyft · Coding Questions · Difficulty: Medium · Last asked May 12, 2026
A grid models a spreading infection. Each cell is empty, healthy (fresh) or infected. Every minute, every infected cell infects all of its healthy 4-directional neighbors (up, down, left, right) at the same time. Compute how long it takes until no healthy cell is left, or report that this never happens.
Loading the problem…
More Lyft interview questions
- Wikipedia Internet Archive / Web Crawler
- Ride Request Demand Prediction by Geohash and Premium Multiplier
- Charity Donation System
- One-Hot Encoder + ML Error Diagnosis
- Frontend Incremental Clicker with Configurable Buttons
- Commuter Coupon Conditional Probability