Seamus Adail
1 min readJun 30, 2020

--

First your explanation of all of this seems spot on from my basic skimming of it. However, both in your explanation and your primary class definition, I believe you actually used the Put incorrectly (both different, both wrong). First, the point of a hashtable is to store value associated to a key, yet in your code you stored used the same value for the key and the stored value. There would be no reason to use a key to retrieve a key. Second, in your example as Amey pointed out you properly stored ‘John’ under the key ‘Paul’, but then attempted to retrieve ‘Paul’ using ‘John’ which would result in an error.

--

--

No responses yet