Search
⌘K
Get Premium
Leetcode 2100. Find Good Days to Rob the Bank
Find all indices i (with at least time elements on each side) such that the preceding time elements form a non-increasing sequence and the following time elements form a non-decreasing sequence. This requires checking monotonic runs around each index (commonly solved by precomputing left/right monotonic lengths and filtering in O(n)).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.