Given an array of integers nums, return the second-largest distinct element in the array. If a second-largest distinct value does not exist, return None. The function should run efficiently without sorting the entire array.
def second_largest(nums):