Description
Solutions
Find Maximum Length of Non-Decreasing Subarray (Part 1)
π©βπ NEW GRADπRELATED PROBLEMS
Note π - It has a follow up question called Longest Non Decreasing Subarray Part 2 π¦
Given an array of size N
, find the maximum length of non-decreasing subarray.
Example 1:
Input: arr = [0, 7, 3, 10, 2, 4, 6, 8, 0, 9, -20, 4]
Output: 4
Explanation:The maximum length of non-decreasing subarray is 4, which corresponds to the subarray [2, 4, 6, 8].
Constraints:
ππ

Related Problems
Testcase
Result
Case 1
input:
output: