I would like to sort a list of ints, where the desired behavior is
input: [-2, 1, 4, -5]
output: [1, -2, 4, -5]
Treating it as a list of strings doesn't work, and neither does treating it as a list of ints as they return
string: [-2, -5, 1, 4]
ints: [-5, -2, 1, 4]
Any pointers on how to received the desired behavior?
[-2, 1, 2, -2, 4, -5]to be sorted?[1, 2, -2, -2, 4, -5],[1, -2, -2, 2, 4, -5], or any arbitrary order for number with sameabsvalue?