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
What is logical database? : abap hr
SAP query how to use end users?
HI GUYS , FOR SAP INSTITUTION ATOS I BEST OR NOT? IAM PLANNING TO LEARN SAP COURSE IN ATOS... GIVE ME UR SUGGESTION ABOT ATOS?
Which infotype records can not be deleted ? : abap hr
What are different abap/4 editors?
Where can you find error log for call transaction? : abap bdc
what are the various types of parameters and how are they distinguished from one another?
Explain the difference between tables and structures?
Can a constructor be declared private? If yes then in which scenario?
wht is the diff. b/n initialization and lotus of event
How to eliminate duplicate entries in internal tables?
To find the date difference & excude saturday & sunday in between them
Can any tell me ECC 5.0, ECC 6.0 Released year? and difference between them?
Differentiate between report and dialog program
How do you read files from the presentation server ? : abap bdc