← back to unit
Medium
# searching medium
Second Highest Score
The silver medal matters too! 🥈
You get a list of scores — at least two, all different. Print the second highest score, tracking it in one pass without sorting.
Example:
Input: scores = [40, 75, 62, 88, 19]
Output: 75
88 is the champion. Tracking a runner-up alongside it the whole way through, the second-biggest score turns out to be 75.
💡 need a hint?
srch-second-highest.py🔒 given lines are locked — write your code in between
loading...