Your question is 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.
Motorola MOTOTRBO telemetry processing may need to identify the second highest reading from a batch of numeric measurements. Given a list of integers, return the second largest distinct value without sorting the list.
Implement find_second_largest(nums). The input is a non-empty list of integers containing at least two distinct values. Return one integer: the second largest distinct value in nums.
Duplicate occurrences of the largest value do not count as the second largest value. The input list must not be modified.
def find_second_largest(nums):