小编Haa*_*med的帖子

为什么在哈希映射中查找项目比在数组中查找项目更快?

您可能在某个地方提到过在 hashmap/dictionary/table 中查找元素比在 list/array 中查找元素更快。我的问题是为什么?

(到目前为止我做出的推论:为什么它应该更快,据我所知,在这两种数据结构中,它必须遍历直到到达所需的元素)

arrays search list hashmap time-complexity

2
推荐指数
1
解决办法
1437
查看次数

标签 统计

arrays ×1

hashmap ×1

list ×1

search ×1

time-complexity ×1