DEV Community

[Comment from a deleted post]
Collapse
 
rhymes profile image
rhymes

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.

Collapse
 
trueneu profile image
Pavel Gurkov

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.

 
rhymes profile image
rhymes

True ☺️