Increasing Sublist
Time limit5sMemory limit1024 MB
Given a list of at most 30 integers, find the length of the longest run of consecutive strictly increasing elements.
- Level
Easy2 of 10
- Topics
- Array, Implementation
- Solved
- No attempts yet
Problem
Given a list of numbers, a sublist is one or more consecutive elements of the list. A sublist is increasing when each element is strictly greater than the element to its left. The first element of a sublist has no element to its left, so it has no condition.
Given a list, find the length (number of elements) of the longest increasing sublist.
Input
The first line contains an integer (), the number of elements in the list. The next line contains the elements of the list. Each element is an integer between 1 and 100, inclusive.
Output
Print the length (number of elements) of the longest increasing sublist.