Practice ยท 5 of 5
Second distinct smallest (with a sentinel)
CHALLENGE
Difficulty: advanced+25 XP
Return the **second distinct smallest** value; return -1 when it does not exist (empty, one element, or all values equal).
Examples: {4,1,4,2} โ 2; {5,5} โ -1; {-1,-1,3} โ 3.
Press Submit to check your solution.
Back to lesson: Practice: Method mastery gauntlet