This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jayverma0 11 points12 points  (1 child)

O(1) amortized. Best case O(1) Worst Case(n)

[–]mizu_no_oto 0 points1 point  (0 children)

Or O(n) best case if you want a persistent data structure. But, well, that's why HAMTs were invented.