- My understanding is
ES6 Mapobject can implement aHashmapin Javascript. Is that correct? indexOfmethod in arrays has an O(n) time complexity.- Does
hasmethod in Maps have O(1) time complexity? If yes why? How JS can find an element in a Map object in one step? How it works differently thanindexOf? If not having an O(1) thenEs6 Mapis not a realHashmap...
from Hashmaps and Time Complexity
No comments:
Post a Comment