what is the difference b/w linear search and binary search?
(how can these search)
Answers were Sorted based on User's Feedback
Answer / gurpiar kundu
linear search is applied to looth sorted and unsorted
lists.
binary searchcan is applied to only sorted lists.
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / simrati sharma
in binary search there are many comparisons
as there are elements in the array..
no such comparisons are there in linear search....
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / nijin shah
refer answer 3 for difference and answer 7 for programming
logic just make sure that before going into binary
search(half interval search) ur array or what ever records u
have is in a sorted manner ie either in ascending or
descending order
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / amalberba
The following table shows how the maximum number of
comparisons increases for binary search and linear search.
Array Size Worst Case Comparisons
Linear Search Binary Search
100,000 100,000 16
200,000 200,000 17
400,000 400,000 18
800,000 800,000 19
1,600,000 1,600,000 20
Is This Answer Correct ? | 1 Yes | 0 No |
Difference between top-of-page and top-of-page during at line- selection?
What is abap?
What is a persistent class?
sy-field for internal table process?
Kindly help me to Know the process of mapping in EDI from R/3 to a convertor(third party which translates IDoc flatfile to EDIFACT /XML / FTP /HTTP ) ?
How do you retrieve the data for repetitive structures
What is BAPI ? & its used & functionality.
What is the advantage of structures? How do you use them in the ABAP programs?
What are control break statements?
19 Answers Cap Gemini, College School Exams Tests, Keane India Ltd, Wipro,
which command is used to flushes the database buffer?
You are running a report. It is taking long time for execution. What steps will you do to reduce the execution time.
A window is missing while copying a sapscript from one client to another client. What should be done?