Prototype: countAbove(long[] values,long threshold) -> int counts values strictly greater than threshold without mutation.

Final: runsAbove(long[] values,long threshold) -> List<Range> returns maximal nonempty contiguous runs strictly above threshold as Range(start,end) with half-open indices, in order. Empty input yields empty, equality to threshold ends a run, and a run reaching the final cell has end==length. Return fresh results and preserve values.

Drag or use the arrow keys to resize. Home collapses the question; End collapses the editor. Enter or double-click resets the split.
Loading editor…
No results yet.

Complete the starter code, then run the checks.
Results and errors will appear here.

Java runs on this device with CheerpJ 4.3.