Discussion
Which of the following will return a result most quickly for searching a given key?
Answer: D
Correct answer: Binary Search Tree
A balanced binary search tree finds a key in \( O(\log n) \) comparisons, halving the search space at each step.
An unsorted array and a sorted linked list both require \( O(n) \), the list because it cannot be indexed and so cannot be bisected however well ordered it is. A sorted array also permits binary search at \( O(\log n) \), so the two are comparable on lookup - but the tree keeps that performance while supporting insertion and deletion in \( O(\log n) \), where the array would need elements shifted.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development