All Tracks Problem

Longest Non-Decreasing Subarray
Tag(s):

Data Structures, Dynamic Programming, Easy

Problem
Editorial
Analytics

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:
$$ 1\le N \le100000$$

$$0 \le A[i] \le 1000000$$

SAMPLE INPUT
4
9 1 2 2
SAMPLE OUTPUT
3
Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: C, C++, C++14, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, JavaScript(Rhino), JavaScript(Node.js), Julia, Kotlin, Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, R(RScript), Racket, Ruby, Rust, Scala, Swift, Visual Basic

CODE EDITOR

Initializing Code Editor...
Your Rating:

Contributor

This Problem was Asked in

ThoughtWorks

Challenge Name

Women Application Developer Hiring Challenge

OTHER PROBLEMS OF THIS CHALLENGE
Notifications
View All Notifications