what is the difference b/w linear search and binary search?
(how can these search)

Answer Posted / jeyachandran.p

Binary search is an efficient search compared to linear
search.Binary search requires sorted array while linear
search operates on unsorted array.

In binary search ,we looks through half of the list i.e
the element to be search is compared with mid value, if it
equals to mid value,search operation is over.otherwise if
the search element is smaller we have to search in the first
half of the list else we have to look in second half of the
list.

But linear search or sequential search requires an complete
search over the list.As far as ,Binary search is very best
in time and efficiency.It requires O[log n} times but linear
search requires O[n]times.

Is This Answer Correct ?    14 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens when you post goods issue after delivery? How does the inventory get reduced after the delivery?

565


Explain what is an rfc?

615


What is the use of table control in bdc is it same in module pool table control? : abap bdc

678


Can we create an abap program without using y or z?

587


What are field symbols?

642






What are the differences between interactive and drill down reports?

548


What is personnel sub are

1578


What is difference between inner join and outer join?

636


What is sap abap data classes?

609


how to capture the errors in bdc Call transaction method?

613


What is off cycle payroll run

1788


Explain what are the different functions used in sap script?

550


What are the dynapro keywords?

673


Application Category?

920


What should be declared explicitly in the corresponding abap/4 statements to access internal tables without header lines & why? : abap modularization

618