A Place for Latest Exam wise Questions, Videos, Previous Year Papers, Study Stuff for MCA Examinations - NIMCET
Previous Year Question (PYQs)
2
In __________the search time is independent of the number of elements n.
Solution
We need to find the search method where the search time is independent of the number of elements \(n\).
• Binary Search: Time complexity \(O(\log n)\). Depends on \(n\). ❌
• Hashing: Average case \(O(1)\). Independent of \(n\) (worst case \(O(n)\)). ✅
• Linear Search: Time complexity \(O(n)\). Depends on \(n\). ❌
• Jump Search: Time complexity \(O(\sqrt{n})\). Depends on \(n\). ❌