4 ms·
They are not. Multiple objects can map to the same hash key due to collision. Just because a hashtable containing the hash key of an object does not mean the
by ww520 9y ago
They are not. Multiple objects can map to the same hash key due to collision. Just because a hashtable containing the hash key of an object does not mean the object has been seen before. An object's hash key not contained in the hashtable definitely assures that the object has not been seen before.
- hexane360 9y agoThis is called the contrapositive of your statement. It's logically guaranteed. No one is claiming that "if the hash matches the object must be there". They're saying "if the object is there, the hash will match". This is logically equivalent to saying "if the hash does not match, the object is not there".
- finnh 9y agoGP is right; you need to be careful about how you read it. “contains implies report” is different than “report implies contains”. You are (correctly) arguing the against latter statement, which GP does not make.