4 ms·
Is that an O(n) implementation of pop? I hope you realize my point.. I looked it up and it's not but the point is that you shouldn't have to worry about these
by newen 8y ago
Is that an O(n) implementation of pop? I hope you realize my point..
I looked it up and it's not but the point is that you shouldn't have to worry about these things, including implementation details of trees and hundreds of other data structures.
- oconnor663 8y agoIt isn't. It re-slices the backing array and retains its capacity. (Maybe that's what you looked up at the end?)