Skip to content

mjehuric

bradendubois edited this page Nov 8, 2021 · 10 revisions

Mjehuric

ID: mjehuric

Difficulty: 1.6

CPU Time: 1 second

Memory: 1024 MB

Solution

Take the array of numbers, and looping over the array until it is correctly ordered, if any position's value is less than the value of the position ahead, swap them and output the array; begin with the first position comparing with the second, and move ahead until the second-last position is compared with the last position.

Clone this wiki locally