please help me in this question of computer. tell the major difference between linear and binary search.
Answers
Answered by
1
Answer:
A linear search starts at the beginning of a list of values, and checks 1 by 1 in order for the result you are looking for. A binary search starts in the middle of a sorted array, and determines which side (if any) the value you are looking for is on.
....mrk brainlist plzzzz...
Answered by
5
Heya friend ! ☺
> Here's your answer :
The major difference between linear and binary search is :
- linear search does not required the array to be sorted, whereas, binary search requires that the array be sorted.
- linear search checks for the search item in a linear fashion from the beginning cell till the end where as binary search repeatedly dividing the array into half and the search takes place in one of the halves . the element is searched in the middle cell of every half.
____________________________
Thank you ! ♠
Doubts are most welcome :)
Similar questions