Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 493 Bytes

File metadata and controls

29 lines (18 loc) · 493 Bytes

Creating arrays-challenge project

Learning arrays:

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.

Constraints:

  • 1 <= n <= 10
  • 0 <= numsi <= 100, where numsi is the number at index i.
  • The numbers in nums are not distinct.

Sample input:

5
2 3 6 6 5


Sample output:

5