Description
Solutions
Find Maximum Length of Non-Decreasing Subarray (Part 1)
πŸ‘©β€πŸŽ“ NEW GRAD

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:
    πŸ‰πŸ‰
Thumbnail 0
Testcase

Result
Case 1

input:

output: