dimanche 28 février 2016

How efficient is iterating through an unordered_set?

Does iterating through an unordered_set require looking through each bucket of the hash table? If so, wouldn't that be very inefficient? If I want to frequently iterate over a set but still need remove in O(1) time is unordered_set still the best data structure to use?

Aucun commentaire:

Enregistrer un commentaire