2 ms·
std::map in C++ is way easier to work with than std::unordered_map (which didn't even exist until C++11).
by garmaine 7y ago
std::map in C++ is way easier to work with than std::unordered_map (which didn't even exist until C++11).
- yuushi 7y agoDefine "way easier". The interface, at least for day to day operations, is basically identical.
- garmaine 7y agoSupports more features like ordered traversal, generally faster in most cases (yup!), consistent api cost, doesn’t invalidate iterators on certain operations like moving between maps. That’s just off the top of my head.