Available question text
Given an array where, in each round, you simultaneously remove every element that is strictly less than its left neighbor, compute how many rounds are needed until the array becomes non-decreasing. The challenge is to determine for each element how many steps until (if ever) it’s deleted — typically solved with a monotonic-stack / DP approach to run in linear time for n up to 1e5.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2289. Steps to Make Array Non-decreasing
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source