News for hackers. Stuff that matters.
Re:Spaghetti Sort (2018) by madmax96 on Sunday September 29, 2019 @10:31PM (#21111287)
You can replace the hand with any device that holds the spaghetti. This really is an O(n) algorithm.

Spaghetti sort seems to be an analogue variant of radix sort.

Re:Spaghetti Sort (2018) by FartyMcFarter on Monday September 30, 2019 @03:00AM (#21112411)
I suppose one could add a step 0 to the algorithm:

0: Manufacture a pair of hands big enough to hold all the spaghetti you'll need in the later steps.

Does this step take linear time as well?

Re:Spaghetti Sort (2018) by madmax96 on Tuesday October 01, 2019 @01:18PM (#21127942)
Does it take O(n) time to manufacture computer memory? I don’t know, but it doesn’t affect the runtime of algorithms.
Re:Spaghetti Sort (2018) by FartyMcFarter on Tuesday October 01, 2019 @05:27PM (#21130888)
But many sorting algorithms work in-place, so they don't require extra memory beyond a small O(1) or O(log n) amount for bookkeeping.

When algorithms do require extra memory, they state this requirement as the space complexity.

Re:Spaghetti Sort (2018) by random_savv on Monday September 30, 2019 @06:08AM (#21113398)
I came here to write this comment. Glad somebody beat me to it! +1