Sorting Numbers
Моля за едно рамо. В Джъдж ми дава само 50/100 и не мога да разбера защо?
задача - https://pastebin.com/GaXfc5qQ
условие -
1.Sorting Numbers
Write a function that sorts an array of numbers so that the first element is the smallest one, the second is the biggest one, the third is the second smallest one, the fourth is the second biggest one and so on.
Return the resulting array.
Example
Input |
Output |
[1, 65, 3, 52, 48, 63, 31, -3, 18, 56] |
[-3, 65, 1, 63, 3, 56, 18, 52, 31, 48] |