Hacker News new | past | comments | ask | show | jobs | submit login

aka bubble sort



It is definitely not bubble sort, which only uses a single index comparing items next to each other in the array.


Check the direction of the comparison, and check the bounds of the loops. It's not really bubble sort.


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: