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...

what is meant by binary search?

Answer Posted / kiran

Record split into 2 halfs

compare last value of 1st half and 1st value of 2nd half

ex
we have 100 numbers
if we give 58

1-50 51-100
1st half second half

it ill check the last value of 1st half it is 50 and 1st
value of 2nd half it is 51

so it ill omit 1st half contains 1-50

again 51-100 split in 2 halfs

51-75 75-100
1st half 2nd half


it ill check the last value of 1st half it is 75 and 1st
value of 2nd half it is 100

so it ill omit 2nd half contains 75-100

like that process ill continue upto we get desired element

plz correct if i m worng

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you define single dimensional array and multidimensional array in your cobol?

1049


How to know whether the module is dynamical or statistical?

1082


What rules are followed by the search verb.

1051


Which Search verb is equivalent to PERFORM…VARYING?

999


Whats the difference between search & search ALL?

6365


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1509


How do you define a variable of comp-1 and comp-2?

1138


What is the difference between goback, stop run and exit program in cobol?

1525


What is static and dynamic call in cobol?

1004


Which mode is used to operate the sequential file?

1152


What is the difference between next sentence and continue in cobol programing language?

1163


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2534


What is the difference between a binary search and a sequential search what are the pertinent cobol?

1095


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

1061


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

12191