Skip to content

Latest commit

 

History

History

arrays-challenge

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

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