Why not use hashing/hash tables for everything?

后端 未结 5 577
梦如初夏
梦如初夏 2020-12-29 03:13

In computer science, it is said that the insert, delete and searching operations for hash tables have a complexity of O(1), which is the best. So, I was wondering, why do we

5条回答
  •  难免孤独
    2020-12-29 03:47

    You may use Hash to search the element, but you cannot use it to do the things like find the largest number quickly, you should use the data strutcture for the specified problem. Hash cannot solve all the problem.

提交回复
热议问题