|
|
|
|
|
by Fearlesspancake
895 days ago
|
|
>quicksort and mergesort are very inhuman sorting algorithms; people usually do something like insertion sort in real life (perhaps with a round of radix/bucket sort initially, if there are a lot of items), since the merge and partition operations are very unnatural. Does anyone know if there's a name for this concept of a human-implementable algorithm? I'm also interested in this. Is anyone aware of further reading on e.g. what sorting algorithm a person is likely to use when arranging a hand of playing cards? I'm curious what algorithms we apply in everyday life subconsciously. Related: A few years ago I had a try at making a "human-friendly" sorting algorithm, that would ask the user a series of "this or that" questions to help them sort a list by preference[0]. I didn't want to use straight up MergeSort or QuickSort, since those would often lead to asking about the same item several times in a row. Instead, it randomly chooses items to compare, and accounts for transitivity (if a>b and b>c, assume a>c) to limit redundant comparisons. [0] https://github.com/TimH98/HumanSort/blob/master/humansort.py - forgive the lack of documentation :) |
|