Given an array of integers, find the second largest element without sorting the array. Explain your approach and write the code
Treat "second largest" as the second distinct largest value. Implement def second_largest(nums):, returning that integer, or None when fewer than two distinct values exist. Examples: [3, 1, 4, 2] returns 3; [5, 5, 2] returns 2.
def second_largest(nums):