Spaghetti length is made visible (quickly comparable), but it's still not sorted.
Dropping spaghetti is an O(1) operation. Once that's done there's a straightforward O(N) sort by removing noodles in the order that they're intersected by horizontal plane descending from max_noodle_length to the table.
It is sorted chronologically
Dropping spaghetti is an O(1) operation. Once that's done there's a straightforward O(N) sort by removing noodles in the order that they're intersected by horizontal plane descending from max_noodle_length to the table.