Given an array of integers nums, return the second largest distinct number in the array. If a second largest distinct number does not exist, return None.
Write a function that scans the array efficiently without sorting it. The array may contain duplicate values and negative numbers.
numsnums, or None if it does not existdef second_largest(nums):