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