我知道unordered_map有O(1)查找,但是std::find()是搜索算法(我猜)在其他containers.So中,是O(1)还是O(n),考虑到没有冲突。
发布于 2020-12-03 14:23:51
从优先选择到std::unordered_map<Key,T,Hash,KeyEqual,Allocator>::find
std::unordered_map<Key,T,Hash,KeyEqual,Allocator>::find
复杂性 常量平均,最坏情况与容器大小成线性关系。
https://stackoverflow.com/questions/65127785
相似问题