Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
demosito666
on Oct 5, 2021
|
parent
|
context
|
favorite
| on:
Is this the simplest (and most surprising) sorting...
aka bubble sort
miloignis
on Oct 5, 2021
|
next
[–]
It is definitely not bubble sort, which only uses a single index comparing items next to each other in the array.
balefrost
on Oct 5, 2021
|
prev
[–]
Check the direction of the comparison, and check the bounds of the loops. It's not really bubble sort.
recursive
on Oct 5, 2021
|
parent
[–]
And check whether the compared elements are adjacent.
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: