Skip to main content

Practice ยท 4 of 5

Longest rising run

CHALLENGE
Difficulty: intermediate+25 XP

Implement int longestRisingRun(int[] arr): the length of the longest stretch of strictly increasing adjacent values. {3, 1, 2, 3, 0, 5} โ†’ 3. This is adjacency scanning + an accumulator + a seeded best โ€” compose them; run the empty and single probes first.

Back to lesson: Practice: Mixed clinic