Your question is Find Second Largest in Array. 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 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):