|
|
|
|
|
by cinnamonheart
2425 days ago
|
|
The logic of bubble sort is so simple that just the description is enough for an implementation. It's a common interview question for the same reason Fizzbuzz is used -- any programmer worth their salt should be able to just write it down. Insertion and selection sort are also O(N^2), but sorts like merge and quick will use them to sort small sublists in their recursive cases because they are fast when input is small enough. |
|
It's definitely easy to implement, it just had me worried because I had never heard of it!