Assume the words of a text are stored in a hash table Search

Assume the words of a text are stored in a hash table. Searching a single word takes

Assume the words of a text are stored in a hash table. Searching a single word takes (assume the text has n characters, the word m, and the alphabet has size d) O(log n) worst case O(log n) expected case O(m^2) expected case O(n) worst case O(1) worst-case O(m) worst case O(1) expected case O(log m) worst case O(m) expected case O(d) expected case O (n) expected case O(log m) expected case

Solution

Answer:

Correct Answer is Option A and Option G i.e O(log n) worst case and O(1) expected case.

Explanation :

In general in search of element in hash table we will take best or expected case as first element to be found in search which is O(1) and worst case is the element which is found at the last of the search which takes many number of collisions which results in O(log n) as complexity time.

Assume the words of a text are stored in a hash table. Searching a single word takes Assume the words of a text are stored in a hash table. Searching a single w

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site