Strict Increase Run Audit
Preview mode. Log in to edit, run, submit, and save progress.
Strict Increase Run Audit
A quality signal is excellent while every next reading is strictly greater than the previous reading. For each signal log, find the longest excellent run that uses consecutive readings from the original order. Input Format: The first line contains t, the number of test cases. Each test case contains n followed by n readings. Output Format: For each test case, print the length of the longest strictly increasing contiguous run.
Examples
1 6 1 2 2 3 4 1
3
Explanation: The longest strictly increasing run is 2, 3, 4, with length 3.
Approach hint
Start with the simplest clear approach, explain the trade-off, then move toward the cleaner answer.
Common mistake
Skipping assumptions, edge cases, or trade-offs can make an otherwise good answer feel incomplete.