3 ms·
This won't work in linear time, since you need time proportional to the square root of the number of spaghetti to move your picker from the position of the long
by adrianN 8y ago
This won't work in linear time, since you need time proportional to the square root of the number of spaghetti to move your picker from the position of the longest spaghetti to your output list.