4 ms·
It's bucket sort, and parent is suggesting insertion sort within each bucket as the pre-merge step. Say you're sorting alphabetically by title. You make one bu
by jasonjmcghee 2y ago
It's bucket sort, and parent is suggesting insertion sort within each bucket as the pre-merge step.
Say you're sorting alphabetically by title. You make one bucket per letter- put books into their respective bucket based on first letter of title. Then sort using insertion sort within each bucket. Then you're done.
(insertion sort is the human natural one- look for where the next one goes based on what you have so far and insert)
Same works for other heuristics.