Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 384 Bytes

(7 kyu) Sort Numbers.md

File metadata and controls

12 lines (8 loc) · 384 Bytes

Sort Numbers (7 kyu)

https://www.codewars.com/kata/sort-numbers/

Finish the solution so that it sorts the passed in array of numbers. If the function passes in an empty array or null/nil value then it should return an empty array.

For example:

sort_numbers(&vec![1, 2, 3, 10, 5]); // should return vec![1, 2, 3, 5, 10]
sort_numbers(&vec![]); // should return !vec[]