Problem Brief
Find Maximum Length of Non-Decreasing Subarray (Part 1)
NEW GRADPHONE SCREEN
See Google online assessment and hiring insights
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.
1Example 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
Limits and guarantees your solution can rely on.
ππ