DEV Community

loading...

Discussion on: Two Sum solved in javascript

Collapse
linuxnerd profile image
Abhishek Prakash

I think he meant the time complexity of search operation on a hash table is O(1) and not for the solution.

Collapse
bhanuchhabra7 profile image
Bhanu Chhabra

Well that is quite confusing. Atleast on my part it is.
People report the solution's complexity with subparts to prove some point.

But just pointing complexity of just 1 sub part and not talking about whole algo/solution is somewhat unusual.

Collapse
bhanuchhabra7 profile image
Bhanu Chhabra

Also the conclusion doesn't matches with any content in description.

The base of conclusion should be discussed in opening statements.