what is meant by binary search?

Answer Posted / sumankumar

IT MEANS DATA SPLIT INTO 2 HALFS AND COMPARE FIRST HALF LAST
VALUE AND SECOND HALF FIRST VALUE WITH GIVEN DATA THEN
ELIMINATE HALF OF THE DATA AND AGAIN SPLIT INTO NEXT 2 HALFS
THIS PROCCESS WILL BE CONTINUED STILL VALUE IS IDENTIFIED

LET ME KNOW ONE EX:
PROGRAM: CONSIDER 1,2,3,4,5,6,7,8,9,10.
SET I TO 2
SEARCH ALL DATA
AT END DISPLY " EOT"
WHEN DATA(I)= 4
END-SEARCH ALL

SOL: THE DATA DIVIDE INTO 2 HALFS 1 TO 4, 5 TO 10 U R
REQUIREMENT IS SERCH AT POSITION OF 4 SO IT COMPARE FIRST
HALFS OF LAST VALUE i'e 4 AND SECOND HALFS OF FIRST VALUE
i'e 5 AND ELIMINATE THE HALF OF DATA AND AGAIN SPLIT IT INTO
NEXET 2 HALFS THIS PROCCESS WILL BE CONTINUED STILL VALUE IS
IDENTIFIED

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between comp and comp-3 usage?

669


What is link edit in cobol?

733


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

1998


How you can read the file from bottom?

654


How do you differentiate between cobol and cobol-ii?

646






Are you comfortable in cobol or jcl?

633


What is report-item in COBOL?

702


Why would you use find and get rather than to obtain?

675


How can you get the ksds file records into your cobol program?

636


how do you reference the printer file formats from cobol programs

648


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

1757


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1605


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

705


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8142


Name the sections present in data division.

695