(given a key). How do I do that in the UVA Judge (with least coding)?
I read about using hash_map from some extension library of
the Standard C++. But that does not work for me
(compilation errors). Maybe I am doing something wrong.
Is it possible to get this working (constant time c++ hash map) without
too much coding or do I need to code a bit more for this? I am asking this
as in Java there's a standard hash table (with constant time
access by key /well, at least in theory it is 'constant time' /).
But in Java everything is quite different - it is interpreted,
each object derives from java.lang.Object and has
hashCode() and equals() methods. But anyway.
So the point is that in C++ the standard map has O(log(N))
access when searching for a key (at least that's what Wikipedia says).
And log(N) is too much for me for a certain problem which I am trying to solve.
For all answers - thanks in advance.
(and yes, I am not a guru in C++, I know my question
is pretty basic
![:)](./images/smilies/icon_smile.gif)
and did not find much information)