3 ms·
A very interesting suggestion indeed. Shell sort is an insertion sort though. It owes its better complexity from being able to breaking out of loop early. But t
by gerbenst 6y ago
A very interesting suggestion indeed. Shell sort is an insertion sort though. It owes its better complexity from being able to breaking out of loop early. But these are difficult to predict branches that bubble sort avoids.
Certainly this is worth an experiment
- kzrdude 6y agoWell, you are the expert :). I misremebered and thought of the base case for shell sort to be a kind of bubble sort.