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

Answer Posted / anupama singh

| Binary search | Linear search |
-------------------------------------------------------------------------------------------------------------------------
1).Data must be in a sorted order | 1).Data any order
2).Time complexity is O(log n) | 2).Time complexity is O(n).
3).Only 1 "When" condition used | 3).Any no. of "When" condition used
4).Only "=" relation operator is used | 4).any relation operator is used
5).Access is faster | 5).Access is slow
6).Only single dimensional array used | 6).single/multi dimensional array used

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the Control levels in internal tables?

602


What are the user groups?

582


what next in SAP-ABAP/4 is it going to be change?

1669


What are the events used for logical database?

613


What will happen when we use fully buffered in abap?

572






What is a table pool? : abap data dictionary

615


What is the difference between getting and get late?

603


What are the main uses of the primary key?

739


What are data classes? What are the various data classes available for selection? : abap data dictionary

571


What is the maximum number of structures that can be included in a table or structure : abap data dictionary

823


How can you manipulate the presentation and attributes of interactive lists?

630


Is it possible to pass data to and from include programs explicitly?

599


Difference between BDC vs Direct Loads?

676


How did you test the form you developed? How did you taken print?

619


How do you set up background jobs in sap? What are the steps? What are the events driven batch jobs?

584