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:
Anonymous2012-03-19 18:57
>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.
Homegirl, if a number outside of a defined set maps to true/false, then is it a well defined function?
>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?
You're confused. If the set undergoes an integral transformation, no error will be thrown, because like, ya know, it's a legal conversion.