Practice · 2 of 3
Timed (6 min): two-pass method
CHALLENGE
Difficulty: advanced+25 XP
Set **6 minutes**. Implement secondLargest(int[] arr): the second distinct largest, or -1 when it doesn't exist (empty, one element, all equal). Two passes are explicitly fine — the tie-break clause is the trap.
Log your phases afterward.
Press Submit to check your solution.
Back to lesson: Practice: Timed set: against the clock