Days Until No Plant Dies
Asked at Walmart Labs · Coding Questions · Difficulty: Hard · Last asked Feb 24, 2026
A row of plants is given as a list of pesticide amounts, left to right. Every day, each plant that has strictly more pesticide than the plant immediately to its left dies. All such plants die at the same moment, and then the survivors close ranks, so a survivor can get a new left neighbour. Count the days on which at least one plant dies before the row stops changing.
Loading the problem…
More Walmart Labs interview questions
- Design State-Wide Temperature Sensor Ingestion
- Design Walmart Plus Membership System
- Design Multi-Carrier Package Delivery Routing System
- Live Refactor - Function to Production Service
- Design Ticketmaster - Event Booking and Seat Reservation
- ML System Design - Predict Item Category