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-19 18:09

>>123
>>124
>>126
>>127
>>128
Same guy?

You're bringing in details that have no relevance to the mathematical definition you fuckwit. Just because it's possible in an implementation to give an input or return an output that is outside the range doesn't mean the function isn't well-defined. In practice, you would throw an error some way or another if something like that happened (or in this case, just return "false" indicating it isn't a member of the subset). In maths, we don't really consider things like that... but you wouldn't know that, would you?

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