Question: Given the following hash table, how many items are compared when searching for item 45 using the following search algorithm? hashTable: 0 1 2 47

Given the following hash table, how many items are compared when searching for item 45 using the following search algorithm? hashTable: 0 1 2 47 3 28 4 5 25 - 65 6 7 HashSearch (hashTable, key) { bucket List = hashTable (Hash (key) 1 itemNode List Search (bucket List, key) if (itemNode is not null) return itemNode-data else return null 3 items: 25, 45 and 65 4 items: 47, 28, 25, and 45 2 items: 25 and 45 1 item: only 45
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
