CT173

Longest Climbing Segment

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Find the longest contiguous stretch of strictly rising readings. Task: Find the length of the longest contiguous strictly increasing run. Input format: n followed by n integers. Output format: One integer: the length. Constraints: 1 <= n <= 100000; -10^9 <= a[i] <= 10^9 Edge rules: Apply the stated zero, tie, boundary, and ordering conventions exactly.

Example 1:

Input: 1 5
Output: 1

Example 2:

Input: 5 1 2 3 2 4
Output: 3

Example 3:

Input: 5 4 1 9 -2 6
Output: 2

Constraints:

1 <= n <= 100000; -10^9 <= a[i] <= 10^9

Tags:

arrays runs
Loading...
Test Cases:No test cases
No test cases available.
Longest Climbing Segment - EASY Coding Problem | CodeTikki