哈希表中的打开寻址仅对搜索有用吗?元素如何首先进入HashTable? [英] Are Open Addressing in Hash Tables only useful for searching ? How do the elements get into the HashTable in the very first place?

查看:63
本文介绍了哈希表中的打开寻址仅对搜索有用吗?元素如何首先进入HashTable?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自打开地址上的Wikipedia链接:

开放式寻址或封闭式散列是一种冲突方法哈希表中的分辨率.使用这种方法,哈希冲突是通过探测或在数组(探测序列),直到找到目标记录或找到未使用的阵列插槽,这表明不存在这样的阵列插槽键. 1 .

对此我有两个问题.

  1. 使用奇特的术语开放式寻址封闭式散列的直觉是什么?
  2. 这种开放式寻址方法不仅对搜索有用,而且对插入有用吗?

推荐答案

我参加聚会有点晚了,但是术语封闭式哈希"是指哈希表中包含的项目封闭"的事实数组,它们不会像通过链接(也被称为开放哈希"(Open Hashing))那样存储在外部.

I am a bit late to the party but it the term closed hashing refers to the fact that the items are 'closed', that is contained within the hash tables array, they are not stored externally like with chaining (also confusingly called Open Hashing).

在您阅读CLRS的第270页时,会在插入时使用开放式寻址以及进行搜索.

Open addressing is used with insertion as well as for searching if you read page 270 of CLRS it is described there.

这篇关于哈希表中的打开寻址仅对搜索有用吗?元素如何首先进入HashTable?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆