Why not use hashing/hash tables for everything?

后端 未结 5 578
梦如初夏
梦如初夏 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 04:04

    1. Hash Tables are not sorted (map)
    2. Hash Tables are not best for head/tail insert (link list/deque)
    3. Hash Tables have overhead to support searching (vector/array)

提交回复
热议问题