News for hackers. Stuff that matters.
Re:Is this the simplest (and most surprising) sorting algori... by demosito666 on Tuesday October 05, 2021 @09:24AM (#28759071)
aka bubble sort
Re:Is this the simplest (and most surprising) sorting algori... by miloignis on Tuesday October 05, 2021 @09:26AM (#28759113)
It is definitely not bubble sort, which only uses a single index comparing items next to each other in the array.
Re:Is this the simplest (and most surprising) sorting algori... by balefrost on Tuesday October 05, 2021 @09:29AM (#28759158)
Check the direction of the comparison, and check the bounds of the loops. It's not really bubble sort.
Re:Is this the simplest (and most surprising) sorting algori... by recursive on Tuesday October 05, 2021 @09:57AM (#28759551)
And check whether the compared elements are adjacent.