GATE / CS ARCHIVE

GATE CSE 1995 / QUESTION 2.22

Hashing, recursion and search efficiency

Algorithms · Searching, Sorting & Selection · Full GATE CSE 1995 paper

GATE 1995, Q2.22 2 marks · MCQ
Report issue

Searching, Sorting & Selection

Question 2.22, GATE 1995: Evaluate I more hash entries increase collisions; II recursive programs are efficient; III quicksort worst case O(n²); IV binary search on a linear linked list is efficient.
Question 2.22, GATE 1995: Evaluate I more hash entries increase collisions; II recursive programs are efficient; III quicksort worst case O(n²); IV binary search on a linear linked list is efficient.
Tap to enlarge
Your answer
Answer & solution

Answer: D: I and III under the usual fixed-table expected-collision interpretation (no official key was published)

Quicksort can repeatedly split off only one pivot, giving (n−1)+(n−2)+…+1=Θ(n²), so III holds. In a fixed-size table under uniform hashing, adding keys increases expected collision pressure, supporting I in the conventional sense. Recursion alone guarantees no efficiency bound, and a linked list lacks constant-time midpoint access, so II and IV are not general truths. Strictly, a particular inserted key can land in an empty bucket without adding a collision; “increases” in I is an expected trend or nondecreasing count, not a guaranteed strict increase at every insertion.

Original paper, page 5