No installations needed! Write Python directly in your browser and get instant feedback with our smart validation system.
Identify the second-largest number from a list of integers.
You are given a list of integers named
Write a function
Assume the list contains at least two distinct numbers.
Do not use built-in sorting methods like
Your solution should work efficiently even for large lists.
Output:
Get your code reviewed and validated to understand what you did right and where you can improve.