2 ms·
Python essentially does this as well. The idea is that an item is in the set if it's in the hash table. You can add, remove, or test for membership in constant
by freyr 9y ago
Python essentially does this as well.
The idea is that an item is in the set if it's in the hash table. You can add, remove, or test for membership in constant average time.
Set operations still need to be built on top of this.