题目
题目

FIT1008-FIT1054-FIT2085_S2_2025 Week 8 Workshop Quiz

单项选择题

I want to keep track of the number of collisions I have. So far, I have observed 2 collisions. No items have been removed from the hash table. I add a single item Charlie to the hash table. The hash position for Charlie is 4. What will my updated values be?Note: We are using Linear Probing to handle collision resolution.

选项
A.a. 3 collisions
B.b. 2 collisions
C.c. It's impossible to tell
D.d. 4 collisions
题目图片
查看解析

查看解析

标准答案
Please login to view
思路分析
First, restate the scenario: The hash table uses linear probing for collision resolution, and you have already observed 2 collisions before inserting Charlie. The hash position for Charlie is 4. The current table (based on the diagram) shows that positions 4 and 5 are occupied (Anne at 4, Frank at 5), while 6 is empty. Option a: '3 collisions' would imply only one addition......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!