Swift Dictionary: removing time complexity

As indicated by the official website , deleting with a key from a dictionary (or map in other languages) is O (n) in Swift, which makes it rather inefficient.

Why is it not O (1) if put () and get () should be O (1) based on the hash?

enter image description here

+4
source share

Source: https://habr.com/ru/post/1695940/


All Articles