Comment by masklinn
5 years ago
> For example, a sort function may do insertion […]
That’s generally called “adaptive”. A famous example of that is timsort.
Your version has issues though: insertion sort is stable, which can dangerously mislead users.
No comments yet
Contribute on Hacker News ↗