Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rodolfoghi/freecodecamp-code-challengs


https://github.com/rodolfoghi/freecodecamp-code-challengs

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# 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

* [Go](./2024-05-03/go/second_largest.go)