Given an array of integers nums, return the second largest distinct number in the array. If the array does not contain at least two distinct values, return None. The input is an unsorted list, and the solution should work efficiently without requiring a full sort.
def second_largest(nums):