vendredi 12 avril 2019

Greatest value from an array of numbers (Ruby)

I am currently learning Ruby and for the sake of my life I cannot find a solution to this:

Return the greatest value from an array of numbers.

Input: [5, 17, -4, 20, 12] Output: 20

Can anyone help me out with this and explain why they used their solution?

thank you.

Aucun commentaire:

Enregistrer un commentaire