有一个散列表,共有N个槽,采用双散列探查的闭散列方法解决冲突。经过一系列插入操作,当前散列表中有M个元素,负载因子a为0.1,即M/N=a=0.1。假设M,N都非常大,并且双散列探查方法近使得每一次探查的位置,可以近似为均匀分布(即等概率地探查每个槽)。 当前对于某个关键码,近似估算不成功检索的平均检索长度()请保留2位小数 There is a hash table of size N, using closed hashing implemented by double hashing retrieval to solve conflicts. After a series of insert operations, there are M elements in the table, the load factor a is 0.1, which means M/N = a = 0.1. We assume that m and n are both very big. And the probabilities of all the position to be probed is approximately evenly distributed because of double hashing retrieval. Now for some key value, approximately estimating the average length of failed retrieval (). Please keep two places of decimal.
第1题
A、2
B、1
C、4/3
D、5/3
第2题
一个散列表的散列函数是h(key)=key%19,共有20个槽,用闭散列的线性探查方法。从空表开始,依次进行如下插入删除操作,问这些操作的平均检索长度是: 提示:散列表中不能插入两个相同的关键码 There is a hash table of size 20, its hashing function is h (key) = key % 19. We use linear probing of closed hashing. We start from an empty table, in turns, perform the following insert operations and delete operations, ask you what is the average length of retrieval: (Express the answer by integer or fraction.) Hint: we can’t insert two same key values into a hash table. Add 26 Add 25 Add 24 Add 195 Del 26 Add 176 Add 45
A、15/7
B、16/7
C、2
D、16/5
第3题
一个散列表的散列函数是h(key)=key%19,共有20个槽,用闭散列的线性探查方法。从空表开始,依次进行如下插入删除操作,问这些操作的平均检索长度是: 提示:散列表中不能插入两个相同的关键码 There is a hash table of size 20, its hashing function is h (key) = key % 19. We use linear probing of closed hashing. We start from an empty table, in turns, perform the following insert operations and delete operations, ask you what is the average length of retrieval: (Express the answer by integer or fraction.) Hint: we can’t insert two same key values into a hash table. Add 26 Add 25 Add 24 Add 195 Del 26 Add 176 Add 45
A、15/7
B、17/7
C、2
D、16/5
第4题
A.1.5
B.1.7
C.2
D.2.3
第5题
列表开始,依次插入关键码值 36,95,14,27,68,82,则最后一个关键码插入后散列表的负载因子 a 约
为( )。
A)0.45
B)0.55
C)0.65
D)0.75
第7题
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!