From de8a991166f3a1911aa93f43866b8ec8b9774dce Mon Sep 17 00:00:00 2001 From: saad0105050 Date: Sun, 14 Sep 2014 04:52:28 -0400 Subject: [PATCH] Fixed a bug (due to typo) in the contains() function in LinearProbingHashTable. --- YASI_12/ds.LinearProbingHashTable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YASI_12/ds.LinearProbingHashTable.h b/YASI_12/ds.LinearProbingHashTable.h index a4ed956..aac6a75 100644 --- a/YASI_12/ds.LinearProbingHashTable.h +++ b/YASI_12/ds.LinearProbingHashTable.h @@ -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){