Re:Spaghetti Sort (2018)
by s_gourichon on Thursday October 03, 2019 @02:48PM
(#21150584)
Interesting remark. So, a "data structure where the largest remaining element can be extracted in O(1) time" can be turned into a sorted list in O(n) time.
So, under the assumtions, the overall algorithm does complete in constant time.
For example, a sorted linked list behaves almost exactly like this spaghetti column.