Complete the getSecondLargest function. It has one parameter:
an array, nums
, of n
numbers. The function must find and return the second
largest number in nums
.
- 1 <=
n
<= 10 - 0 <=
nums
i <= 100, wherenums
i is the number at index i. - The numbers in
nums
are not distinct.
5
2 3 6 6 5
5