You must log in or register to comment.
You still have to check that it’s sorted, which is O(n).
We’ll also assume that destroying the universe takes constant time.
In the universe where the list is sorted, it doesn’t actually matter how long the destruction takes!
amortized O(0)
We’ll also assume that destroying the universe takes constant time.
Well yeah just delete the pointer to it!
universe.take()