Skip to main content

Checkpoint: two bugs

Challenge on lesson: Checkpoint: two bugs, one method

CHALLENGE
Difficulty: intermediate+25 XP

secondMax needs two repairs: the tracking logic (the else branch is wrong) and the distinctness report. Trace {5, 3, 5} and {7} and {2, 2} by hand, locate the first divergences, and repair both.

Back to lesson: Checkpoint: two bugs, one method