Skip to content

Commit

Permalink
Fixed a bug (due to typo) in the contains() function in LinearProbing…
Browse files Browse the repository at this point in the history
…HashTable.
  • Loading branch information
saad0105050 committed Sep 14, 2014
1 parent 0d8db9f commit de8a991
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion YASI_12/ds.LinearProbingHashTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ namespace ds{
}

virtual void put(const Key& key, const Value& value) override { return insert(key, value); }
virtual bool contains(const Key& key) const override { return lookupKey(key) == NULL; }
virtual bool contains(const Key& key) const override { return lookupKey(key) != NULL; }
virtual void remove(const Key& k) override {
// zero key
if (k == 0){
Expand Down

0 comments on commit de8a991

Please sign in to comment.