Log in
← All problems

Sort it yourself

mediumSorting and searching20 XP

Return nums sorted from small to large, without using a built-in sort. Bubble sort is a good start: keep swapping neighbours that are in the wrong order.

Examples

Examples use JSON: true/false/null are True/False/None in Python.

Run examples checks the examples above. Submit also runs 3 hidden tests.