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 16:44
>>122 When you say not in the set, you mean not in the domain of the function? That can't happen.
Yes it can. Consider a set of unsigned integers {1...2^n-1} that maps to {true, false} . Now let's say this set undergoes an integral promotion. The end result is a number a outside of {1...2^n-1} would map to 'false'.
Name:
Anonymous2012-03-19 16:49
>>122 I don't see what not having a boolean type has to do with it. As long as you can represent "true" and "false", it's fine.
Having a boolean type gets around having a number outside of a set map to either 'true' or false'.
Hmm...ya know, I think I just lost all the minimum wage taco pushers who like to say "learn basic mathematics".
Name:
Anonymous2012-03-19 16:59
>>122
Listen you mental midget, go work the cash register at target. I bet they appreciate your lame math skills . Also you still haven't posted any code, also you're still a minimum wage worker.
Name:
Anonymous2012-03-19 17:00
>>125
Minimum wage bitch, you still haven't posted any code, you still don't work as aprogrammer.
Name:
Anonymous2012-03-19 17:21
>>125
I'm still not convinced you understand what is being discussed in this thread. Now hush up and go help another customer you no talent bitch.