Your question is Find Second Largest Element. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
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):