Longest Increasing Prefix Length

Programming Interview Medium 4 views
Back to Questions

Problem Description

For each testcase you get n numbers. Compute length of the longest prefix that is strictly increasing.

Input Format

First integer t. For each: n then n integers.

Output Format

t lines lengths.

Sample Test Case

Input:
2 5 1 2 3 2 5 4 10 20 30 40
Output:
3 4

Constraints

Sum of n over all testcases

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next