Computer Science, asked by piyushverma3374, 1 year ago

How is linear search different from binary search?

Answers

Answered by chaudharyrachna1995
1
in linear searching data elements are searched one by one with all the element present in dataeven if the element is found... but in binary search the data is divided in to two parts and then compared with middle element......
Answered by pratyush15899
3

\huge\bold{\mathfrak{\purple❥{A{\pink{N{\green{S{\blue{W{\red{E{\orange{R}}}}}}}}}}}}..✍}

Here are some differences listed below :↝

☞1) Binary search requires the input data to be sorted near search doesn’t.

☞2) Binary search requires an ordering comparison; linear search only requires equality comparisons

☞3) Binary search has complexity 0(log n); linear search has complexity O(n) as discussed earlier.

☞4) Binary search requires random access to the data; linear search only requires sequential access (this can be very important – it means a linear search can stream data of arbitrary size).

╧╤╧╤╧╤╧╤╧╤╧╤╧╤╧╤╧╤╧╤╧╤╧╤╧╤

彡★ Thank You For Asking ★彡

↬↬ \large\fbox\pink{\blue{happy \: to} \: help..❤}

Similar questions