Question 9

Computer Awareness Searching Easy

In ________ the search time is independent of the number of elements n.

(A) Binary Search
(B) Hashing
(C) Linear Search
(D) Jump search
View Dynamic Solution & Explanation
Correct Solution: Option B

Step-by-step Solution:

Explanation:

The question asks: "In ________ the search time is independent of the number of elements \(n\)."

🔎 Let’s analyze the options:

  • Binary Search: Time complexity = \(O(\log n)\). Depends on \(n\).
  • Hashing: Average case search time = \(O(1)\), i.e., independent of \(n\).
  • Linear Search: Time complexity = \(O(n)\). Depends directly on \(n\).
  • Jump Search: Time complexity = \(O(\sqrt{n})\). Depends on \(n\).

✅ Therefore, the search time is independent of \(n\) in:

(B) Hashing