Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
432 views
in Computer by (49.6k points)
closed by

Estimate the number of key comparisons required in binary search and linear search if we need to find the details of a person in a sorted database having 230 (1,073, 741, 824) records when details of the person being searched lie at the middle position in the database. What do you interpret from your findings?

1 Answer

+1 vote
by (51.9k points)
selected by
 
Best answer

If the record is in the middle of the sorted database, it will take one key comparison for binary search. As linear search is sequential that will take 115 keys comparison. 

Interpretation:

  • The linear search method is useful for collecting items that are small in size and are not in any particular order.
  • Binary search is a quick searching technique for large datasets which is in ascending or descending order.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...