Skip to content

rodolfoghi/freecodecamp-code-challengs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

freecodecamp-code-challengs

2024-05-03

@Code Challenge No luck, here. I'm gonna have to buy a new generator, so it's time to go shopping! You know what they say... "First is the worst, second is the best". I think I'll buy the second most expensive generator.

Here is your challenge: Write a function such that, when given an unsorted array of numbers, the function returns the second highest number.

  • secondLargest([10, 40, 30, 20, 50]) should return 40.
  • secondLargest([25, 143, 89, 13, 105]) should return 105.
  • secondLargest([54, 23, 11, 17, 10]) should return 23.

You may use any language you'd like to solve this challenge. Hopefully I can afford the generator you pick...

My solutions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages