题目
DATA STRUCTURES (CS_261_001_S2025) Quiz 4
单项选择题
Which of the following most accurately describes the "load factor"?
选项
A.The load factor is defined as the total number of elements n added, and hence the same as the number of keys.
B.When using quadratic probing, the load factor describes the total number of values defined for the hash function, but not necessarily related to the number of keys.
C.For a hash table with open addressing, the load factor is the size of the array.
D.For a hash table with chaining, it is the average chain length (avg length of the linked lists)
查看解析
标准答案
Please login to view
思路分析
Question restatement: Which of the following most accurately describes the 'load factor'?
Option 1: 'The load factor is defined as the total number of elements n added, and hence the same as the number of keys.' This is incorrect in general. The load factor is typically defined as the number of elements divided by the table capacity (n / m). It does not necessarily equal the number of keys, unless by coincidence n equals m, which is not the standard definition.
Option......Login to view full explanation登录即可查看完整答案
我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。
类似问题
Consider an implementation of a hash table with linear probing where the hash function runs in constant time and the cost of comparison is also constant. What is the best-case time complexity of the __getitem__ method? Consider n is the number of items in the hash table.
Which is TRUE?
What is the best case time complexity of deleting a key from a linear probe table?
Question at position 2 About how many steps would be needed when searching for a particular key in a hash map with 1000 nodes?1000150010
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!