Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Absolute Sorting by szymonkukla1
def checkio(numbers_array):
tab = []
k = 0
while(k < len(numbers_array)):
tab.append(numbers_array[k])
k = k + 1
i = 0
for i in range(len(tab)):
j = len(tab) - 1
while(j > i):
if(abs(tab[j]) < abs(tab[j-1])):
tmp = tab[j]
tab[j] = tab[j - 1]
tab[j - 1] = tmp
j = j - 1
i = i + 1
return tab
#These "asserts" using only for self-checking and not necessary for auto-testing
Oct. 23, 2016