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
254 views
in Arrays by (29.7k points)
closed by

Write the names of two searching methods in arrays. Prepare a chart that shows the comparisons of two searching methods.

1 Answer

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

It is the process of finding the position of the given element. 

1. Linear search: 

In this method each element of the array is compared with the element to be searched starting from the first element. If it finds the position of the element in the array is returned.

2. Binary search: 

It uses a technique called divide and conquer method. It can be performed only on sorted arrays. First we check the element with the middle element. There are 3 possibilities. The first possibility is the searched element is the middle element then search can be finished. 

The second possibility is the element is less than the middle value so the upper bound is the middle element. The third possibility is the element is greater than the middle value so the lower bound is the middle element. Repeat this process.

Related questions

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.

...