检查值是否存在于中的最快方法是什么std::map<int, int>?我应该使用吗unordered map?在这个任务中,我不能使用任何库来代替 std。
std::map<int, int>
unordered map
现在,我不知道有什么方法可以在不检查所有值的情况下做到这一点。
c++ algorithm performance dictionary unordered-map
algorithm ×1
c++ ×1
dictionary ×1
performance ×1
unordered-map ×1