You're right but this is how I intended the code: "pseudo code to explain how a hash table might work" not "this is the most efficient way to implement a hash table on top of an array" which as you notice has linear lookups.
Sure it is merely an example. The problem is that we seem to be talking about time complexity of an unspecified implementation instead of the one in the article, without noting it anywhere.
You're right but this is how I intended the code: "pseudo code to explain how a hash table might work" not "this is the most efficient way to implement a hash table on top of an array" which as you notice has linear lookups.
Sure it is merely an example. The problem is that we seem to be talking about time complexity of an unspecified implementation instead of the one in the article, without noting it anywhere.
True βΊοΈ