Persistent
Company
Category
A hash table has a size of 11 and data filled in its position like{3,5,7,9,6}how many comparisons have to be made if data is not found in the list in worst case
a) 2
b) 6
c) 11
Read Solution (Total 4)
-
- hash table worst case O(1)
hash table best case O(1)
hast table worst case when element is not found =2 complexity special case
- 8 years agoHelpfull: Yes(5) No(0)
- 11....five comparisons for 5 elements and 6 for remaining 6 places to find the elements.
- 10 years agoHelpfull: Yes(4) No(13)
- 6...since hashing technique is used for searching in O(1) time.
- 8 years agoHelpfull: Yes(0) No(3)
- 0
1
2
3 *
4
5 *
6 *
7 *
8
9 *
10
as it is given worst case scenario..so hash function will look for the element in the biggest cluster available in the table i.e. {5,6,7}.
number of comparisons=size of largest cluster + 1
so 3+1=4 - 5 years agoHelpfull: Yes(0) No(0)
Persistent Other Question