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 |
What are the 3 types of function modules in sap?
What is ITS? What are the merits of ITS?
Which infotype records can not be deleted ? : abap hr
What does the extract statement do in extract datasets? : abap modularization
what is the difference between view and join
can u add a new view to the existing view
What is the use of buffering?
when u prefer lsmw?
how to design checkbox on the o/p of the list ,not on the selection screen.
Can I run normal abap applications in browser?if yes how?
Have you set up a back ground job ? How to create a background job without a variant ?
What is the difference between ABAP and HR ABAP