Discussion
The searching technique that takes O(1) to find a data is :
Answer: C
The technique is hashing.
A hash function computes the position of a key directly from the key itself, so a lookup goes straight to the right slot without comparing against other elements. With a good hash function and a low load factor, search takes constant time, O(1), on average.
Linear search takes O(n), binary search on a sorted array O(log n), and a balanced search tree O(log n); none of them finds an item in constant time.
No comment is present. Be the first to comment.
Loading…
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