Longest Non-Decreasing Subarray

3.8

5 votes
Data Structures, Dynamic Programming, Approved, Easy
Problem

Given an array of Integers A , find the length of Longest sub-array whose elements are in Non-Decreasing Order.

Input:
First line of input contains N size of array A. Next line contains N space separated elements of array.

Output:
Print the length of longest sub-array whose elements are in increasing order .

Constraints:
1N100000

0A[i]1000000

Sample Input
4
9 1 2 2
Sample Output
3
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?