Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we use binary search in internal table sorted in decending
order ? if no why?

Answer Posted / sunil kumar gautam

Binary search algorithm is based on middle value , first
data is divided into two part on the basis of middle value
so that left side data is less than middle value and right
side data greater than middle value. Search value is equal
to middle value then it give result middle value. If search
value is greater than middle value it will be search right
side of middle value ,if search value is less than middle
value it will search left side. So Data should be ascending
order so that greater value will be right side of middle
value and lesser value will be left side of middle value.
For example 1,2,3,4,5,6,7,8,9 here middle value is 5.Now we
search 7 it will be search in right part from 5.It is give
result. It’s opposite if it is in descending order
9,8,7,6,5,4,3,2,1.Here 5 is middle value and 7 is searched
in right from 5 according to binary search principle ,it
will fail for the search.

Is This Answer Correct ?    36 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is evaluation path, where do we do it and why? : sap abap hr

1244


How do you move on to the next screen in interactive reporting?

1227


What are the fields in the memory table ‘screen’?

1105


I need the coding for BDC program to upload Purchase orders of known vendor (ME21) in Material Management

2290


How do you find the information on the current screen?

1114


To how many tables can an append structure be assigned. : abap data dictionary

1152


What is Buffering Concept? When should a Table be buffered?

13064


after creating lock object if does n't access record by second user what should we do?

2032


What is the reserve command?

1419


any one can tell me which is the tables can store in ddic plese dont say db02l,please give me different ways of resideing the tables ?

2536


THANKS ALL. i CLEARED THE INTERVIEW OF INFOSYS BASED ON THIS QUESTION SET. IT REALLY WORKS. LONG LIVE ALLINTERVIEW.COM

16484


What is sequence of event triggered in report?

1063


dynamic programming in sap abap

1504


What is an update type with reference to a match code id?

1035


How to read files and process BDC's automatically ?

2136