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 is a 'z' report?

842


What two statements would be used to exchange data between programs using abap memory?

708


what is 3 tire architecture and how does SAP utilizes this architecture. and how do netweaver came into picture?

1985


Name some data dictionary objects?

741


What has to be done to the packed fields before submitting to a BDC session.

937


What are the advantages of logical databases?

807


Can we set page headers to details lists?

774


What is the tcode for sapscript forms?

863


How to write a bdc – how do you go about it?

889


What are the disadvantages of different types of bdc's?

840


Can i Have Some Realtime Examples on Badi ?

8524


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

863


Event handling in oops

1321


How to combine multiple order in one Delivery ( Step by Step)?

2170


What is projection view?

729