In std::unordered_set, we provide a predicate to indicate whether two objects A and B are equal or not. My question is, suppose that we need O(k) time to determine if A and B are equal or not. Does the unordered_set::find still take amortized constant time or does it take amortized O(k) time?
Aucun commentaire:
Enregistrer un commentaire