Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Hash table

Name: Anonymous 2012-02-12 0:24

Is it ever possible to have a Hash table that can do get,put,remove @ O(1) for Strings?

calculating the hash for the String alone is O(n), is it not? [that's if you want to produce a good hash that won't collide all over the place]

Name: Anonymous 2012-03-18 16:51

>>98
ey is probably just using the wrong terms when trying to say that a function needs to be well defined. That is, that f(x) will take on only one value, for each x. An example of a function that is not well defined is the square root function with no convention for sign:

sqrt(x) = y where y^2 = x

both y and -y could be satisfactory outputs for x. So this definition does not uniquely define what values sqrt must take on for all x, and leaves the function not well defined.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List