2 ms·
In spaghetti sort I think you place your hand at the top and remove the first piece to touch it. That takes it from O(n) to O(1) to remove a single piece. Of c
by ladberg 6y ago
In spaghetti sort I think you place your hand at the top and remove the first piece to touch it. That takes it from O(n) to O(1) to remove a single piece.
Of course, your hand is then a magical device that can do a reduction in constant time.