Question 4Asked in UGC NET Computer Science, June 2014 (Paper II & III, Selected Questions)

Searching for an element in the hash table requires O(1) time for the ______ time, whereas for direct addressing it holds for the _______ time.

  1. Aworst-case, average
  2. Bworst-case, worst-case
  3. Caverage, worst-case
  4. Dbest, average
Show answerHide answer

Correct answer: (C) average, worst-case

Explanation

In searching for an element in hash table requires O(1) time for the average time, whereas for direct it holds for the worst-case time. So the correct answer is option (c).

From UGC NET Computer Science PYQ, June 2014 (Paper II & III, Selected Questions)

This is question 4 of UGC NET Computer Science PYQ, June 2014 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.