Domanda di colloquio di Morgan Stanley

The difference between Java and C++'s implementation of Map

Risposte di colloquio

Anonimo

5 feb 2018

C++ has std::unordered_map

Anonimo

30 nov 2012

Java uses hash functions to implement an efficient map (with almost linear complexity), while C++ uses binary trees (which give logN complexity).

2