The Runner-Up
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant feedback.
- Domain
- Python
- Difficulty
- easy
- Seniority
- L5
Problem
A leaderboard already highlights the top score, and the product team wants to show the runner-up beside it. Given a list of scores, return the second-largest distinct value, or `None` when no runner-up exists.
Summary
Not the winner. The one just behind it.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and checks it automatically.