Newgen Software document workflows may need to identify the second highest distinct priority score from a list of values. Given an array of integers, return its second highest distinct number without sorting the array.
If the array contains fewer than two distinct values, return None.
Implement second_highest(nums).
nums, a non-empty list of integers.None when fewer than two distinct values exist.def second_highest(nums):