Back to problems
COMP2521
24T2 Q9 — Longest increasing run
stdin: a list of ints. Print the longest contiguous strictly-increasing sublist of length ≥ 2 (earliest on ties), space-separated. If there is no increasing pair, print NONE.
Single-file C (gcc -O0 -Wall). Self-contained reframing of the exam's ADT-completion question. From COMP2521 24T2 Sample.
Samples
stdin
1 3 2 4 5 6 1 2
expected
2 4 5 6
c-gcc
14