Write a program to find the second largest number in an array without sorting it.
Treat "second largest" as the second distinct-largest value. Implement second_largest(nums), accepting a list of integers and returning an integer. Inputs are guaranteed to contain at least two distinct values.
def second_largest(nums):