by mooshmoosh · 7y ago · 0 comments
If you ignore the usual meaning of linear time and restrict yourself to sorting lists of numbers that will fit in your hand, then spaghetti sort always runs in less time that however long it takes to sort the maximum amount of spaghetti you can hold in your hand. i.e. constant time.
Spaghetti sort seems to be an analogue variant of radix sort.
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?
When algorithms do require extra memory, they state this requirement as the space complexity.
This 2007 blog article is hilarious from today's view: https://nwinton.wordpress.com/2007/06/24/the-iphones-bigger-...