Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2863. Maximum Length of Semi-Decreasing Subarrays
Given an integer array, return the maximum length of a contiguous subarray that satisfies the problem's "semi-decreasing" property (a relaxed/non-strictly-decreasing condition defined in the prompt). This is typically solved in O(n) by scanning with two pointers or DP, tracking monotonic runs and handling the limited breaks in decreasing order to merge segments and update the longest length.
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.