Your question is Second Largest Without Sorting. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
How would you find the second largest number in an unsorted array without using built-in sort functions?
Implement the function below to return the second distinct largest integer. The input contains at least two distinct values, and the result must be found without sorting or other built-in ordering functions.
Input: An array of integers.
Output: The second distinct largest integer.
def second_largest(nums):