SlideShare a Scribd company logo
(1) 7. Find the Order of Growth of the algorithm. Procedure Foo (a1,a2,, an: distinct integers) even
:=0 odd :=0; for x:=1 to n for y:=n downto 1 begin sum:=ax+ay if ( sum mod2=0) even := even +1 ;
else odd := odd +1 ; end if (even >odd) return even; else return odd; (1) 8. Find the Order of
Growth of the Algorithm. Procedure Foo(x: integer; a1,a2,,an : distinct integers) Low :=0; High :=n;
mid :=( low + high )/2 while (amid!=x) begin if (x>amid) low := mid; else high := mid -1 ; mid := (low
+ high )/2 end return mid;

More Related Content

More from adhikaribrothers

1 A firms production process uses labor L and capital K.pdf
1 A firms production process uses labor L and capital K.pdf1 A firms production process uses labor L and capital K.pdf
1 A firms production process uses labor L and capital K.pdf
adhikaribrothers
ย 
1 A company may periodically undertake projects but these .pdf
1 A company may periodically undertake projects but these .pdf1 A company may periodically undertake projects but these .pdf
1 A company may periodically undertake projects but these .pdf
adhikaribrothers
ย 
1 A dsallklar nelerdir A Oluturma Etkilerinde nasl bir rol.pdf
1 A dsallklar nelerdir A Oluturma Etkilerinde nasl bir rol.pdf1 A dsallklar nelerdir A Oluturma Etkilerinde nasl bir rol.pdf
1 A dsallklar nelerdir A Oluturma Etkilerinde nasl bir rol.pdf
adhikaribrothers
ย 
1 A 32yearold man is admitted to the emergency department.pdf
1 A 32yearold man is admitted to the emergency department.pdf1 A 32yearold man is admitted to the emergency department.pdf
1 A 32yearold man is admitted to the emergency department.pdf
adhikaribrothers
ย 
1 A bag contains a collection of distinguishable marbles T.pdf
1 A bag contains a collection of distinguishable marbles T.pdf1 A bag contains a collection of distinguishable marbles T.pdf
1 A bag contains a collection of distinguishable marbles T.pdf
adhikaribrothers
ย 
1 4 marks What external features of birds and sharks are.pdf
1 4 marks What external features of birds and sharks are.pdf1 4 marks What external features of birds and sharks are.pdf
1 4 marks What external features of birds and sharks are.pdf
adhikaribrothers
ย 
1 5 pts Let X be a random variable uniformly distributed .pdf
1 5 pts Let X be a random variable uniformly distributed .pdf1 5 pts Let X be a random variable uniformly distributed .pdf
1 5 pts Let X be a random variable uniformly distributed .pdf
adhikaribrothers
ย 
1 8 pts Show if a random variable XBinnp with the pmf .pdf
1 8 pts Show if a random variable XBinnp with the pmf .pdf1 8 pts Show if a random variable XBinnp with the pmf .pdf
1 8 pts Show if a random variable XBinnp with the pmf .pdf
adhikaribrothers
ย 
1 8 Annotations 4 pts C code 4 pts A function with .pdf
1 8 Annotations 4 pts C code 4 pts A function with .pdf1 8 Annotations 4 pts C code 4 pts A function with .pdf
1 8 Annotations 4 pts C code 4 pts A function with .pdf
adhikaribrothers
ย 
1 2000 ylndan bu yana ABD Hollywood film almalar iin k.pdf
1 2000 ylndan bu yana ABD Hollywood film almalar iin k.pdf1 2000 ylndan bu yana ABD Hollywood film almalar iin k.pdf
1 2000 ylndan bu yana ABD Hollywood film almalar iin k.pdf
adhikaribrothers
ย 
1 6 points Which one of the two terms flavor or buck.pdf
1 6 points Which one of the two terms flavor or buck.pdf1 6 points Which one of the two terms flavor or buck.pdf
1 6 points Which one of the two terms flavor or buck.pdf
adhikaribrothers
ย 
1 64 yanda bir erkek oyun oynadktan sonra hafif ila orta i.pdf
1 64 yanda bir erkek oyun oynadktan sonra hafif ila orta i.pdf1 64 yanda bir erkek oyun oynadktan sonra hafif ila orta i.pdf
1 64 yanda bir erkek oyun oynadktan sonra hafif ila orta i.pdf
adhikaribrothers
ย 
1 4 2 It pelints y3 3 h 10 2 What is the defieition of dr.pdf
1 4 2 It pelints y3 3 h 10 2 What is the defieition of dr.pdf1 4 2 It pelints y3 3 h 10 2 What is the defieition of dr.pdf
1 4 2 It pelints y3 3 h 10 2 What is the defieition of dr.pdf
adhikaribrothers
ย 
1 What are some of the opportunities and challenges that G.pdf
1  What are some of the opportunities and challenges that G.pdf1  What are some of the opportunities and challenges that G.pdf
1 What are some of the opportunities and challenges that G.pdf
adhikaribrothers
ย 
1 4 pts Imagine that you have found a rock made almost en.pdf
1 4 pts Imagine that you have found a rock made almost en.pdf1 4 pts Imagine that you have found a rock made almost en.pdf
1 4 pts Imagine that you have found a rock made almost en.pdf
adhikaribrothers
ย 
1 4 points Consider the word UNCOPYRIGHTABLE Assume th.pdf
1 4 points Consider the word UNCOPYRIGHTABLE Assume th.pdf1 4 points Consider the word UNCOPYRIGHTABLE Assume th.pdf
1 4 points Consider the word UNCOPYRIGHTABLE Assume th.pdf
adhikaribrothers
ย 
1 _____ is the most important workrelated value for those.pdf
1  _____ is the most important workrelated value for those.pdf1  _____ is the most important workrelated value for those.pdf
1 _____ is the most important workrelated value for those.pdf
adhikaribrothers
ย 
1 2 a1 2 3 bI fop panet A TH cell binds.pdf
1 2 a1 2 3 bI fop panet A TH cell binds.pdf1 2 a1 2 3 bI fop panet A TH cell binds.pdf
1 2 a1 2 3 bI fop panet A TH cell binds.pdf
adhikaribrothers
ย 
1 2 3A Dendritic cell engulfs antigen processe.pdf
1 2 3A Dendritic cell engulfs antigen processe.pdf1 2 3A Dendritic cell engulfs antigen processe.pdf
1 2 3A Dendritic cell engulfs antigen processe.pdf
adhikaribrothers
ย 
1 15 Points Read the Case Studies on pages 5557 about Ms.pdf
1 15 Points Read the Case Studies on pages 5557 about Ms.pdf1 15 Points Read the Case Studies on pages 5557 about Ms.pdf
1 15 Points Read the Case Studies on pages 5557 about Ms.pdf
adhikaribrothers
ย 

More from adhikaribrothers (20)

1 A firms production process uses labor L and capital K.pdf
1 A firms production process uses labor L and capital K.pdf1 A firms production process uses labor L and capital K.pdf
1 A firms production process uses labor L and capital K.pdf
ย 
1 A company may periodically undertake projects but these .pdf
1 A company may periodically undertake projects but these .pdf1 A company may periodically undertake projects but these .pdf
1 A company may periodically undertake projects but these .pdf
ย 
1 A dsallklar nelerdir A Oluturma Etkilerinde nasl bir rol.pdf
1 A dsallklar nelerdir A Oluturma Etkilerinde nasl bir rol.pdf1 A dsallklar nelerdir A Oluturma Etkilerinde nasl bir rol.pdf
1 A dsallklar nelerdir A Oluturma Etkilerinde nasl bir rol.pdf
ย 
1 A 32yearold man is admitted to the emergency department.pdf
1 A 32yearold man is admitted to the emergency department.pdf1 A 32yearold man is admitted to the emergency department.pdf
1 A 32yearold man is admitted to the emergency department.pdf
ย 
1 A bag contains a collection of distinguishable marbles T.pdf
1 A bag contains a collection of distinguishable marbles T.pdf1 A bag contains a collection of distinguishable marbles T.pdf
1 A bag contains a collection of distinguishable marbles T.pdf
ย 
1 4 marks What external features of birds and sharks are.pdf
1 4 marks What external features of birds and sharks are.pdf1 4 marks What external features of birds and sharks are.pdf
1 4 marks What external features of birds and sharks are.pdf
ย 
1 5 pts Let X be a random variable uniformly distributed .pdf
1 5 pts Let X be a random variable uniformly distributed .pdf1 5 pts Let X be a random variable uniformly distributed .pdf
1 5 pts Let X be a random variable uniformly distributed .pdf
ย 
1 8 pts Show if a random variable XBinnp with the pmf .pdf
1 8 pts Show if a random variable XBinnp with the pmf .pdf1 8 pts Show if a random variable XBinnp with the pmf .pdf
1 8 pts Show if a random variable XBinnp with the pmf .pdf
ย 
1 8 Annotations 4 pts C code 4 pts A function with .pdf
1 8 Annotations 4 pts C code 4 pts A function with .pdf1 8 Annotations 4 pts C code 4 pts A function with .pdf
1 8 Annotations 4 pts C code 4 pts A function with .pdf
ย 
1 2000 ylndan bu yana ABD Hollywood film almalar iin k.pdf
1 2000 ylndan bu yana ABD Hollywood film almalar iin k.pdf1 2000 ylndan bu yana ABD Hollywood film almalar iin k.pdf
1 2000 ylndan bu yana ABD Hollywood film almalar iin k.pdf
ย 
1 6 points Which one of the two terms flavor or buck.pdf
1 6 points Which one of the two terms flavor or buck.pdf1 6 points Which one of the two terms flavor or buck.pdf
1 6 points Which one of the two terms flavor or buck.pdf
ย 
1 64 yanda bir erkek oyun oynadktan sonra hafif ila orta i.pdf
1 64 yanda bir erkek oyun oynadktan sonra hafif ila orta i.pdf1 64 yanda bir erkek oyun oynadktan sonra hafif ila orta i.pdf
1 64 yanda bir erkek oyun oynadktan sonra hafif ila orta i.pdf
ย 
1 4 2 It pelints y3 3 h 10 2 What is the defieition of dr.pdf
1 4 2 It pelints y3 3 h 10 2 What is the defieition of dr.pdf1 4 2 It pelints y3 3 h 10 2 What is the defieition of dr.pdf
1 4 2 It pelints y3 3 h 10 2 What is the defieition of dr.pdf
ย 
1 What are some of the opportunities and challenges that G.pdf
1  What are some of the opportunities and challenges that G.pdf1  What are some of the opportunities and challenges that G.pdf
1 What are some of the opportunities and challenges that G.pdf
ย 
1 4 pts Imagine that you have found a rock made almost en.pdf
1 4 pts Imagine that you have found a rock made almost en.pdf1 4 pts Imagine that you have found a rock made almost en.pdf
1 4 pts Imagine that you have found a rock made almost en.pdf
ย 
1 4 points Consider the word UNCOPYRIGHTABLE Assume th.pdf
1 4 points Consider the word UNCOPYRIGHTABLE Assume th.pdf1 4 points Consider the word UNCOPYRIGHTABLE Assume th.pdf
1 4 points Consider the word UNCOPYRIGHTABLE Assume th.pdf
ย 
1 _____ is the most important workrelated value for those.pdf
1  _____ is the most important workrelated value for those.pdf1  _____ is the most important workrelated value for those.pdf
1 _____ is the most important workrelated value for those.pdf
ย 
1 2 a1 2 3 bI fop panet A TH cell binds.pdf
1 2 a1 2 3 bI fop panet A TH cell binds.pdf1 2 a1 2 3 bI fop panet A TH cell binds.pdf
1 2 a1 2 3 bI fop panet A TH cell binds.pdf
ย 
1 2 3A Dendritic cell engulfs antigen processe.pdf
1 2 3A Dendritic cell engulfs antigen processe.pdf1 2 3A Dendritic cell engulfs antigen processe.pdf
1 2 3A Dendritic cell engulfs antigen processe.pdf
ย 
1 15 Points Read the Case Studies on pages 5557 about Ms.pdf
1 15 Points Read the Case Studies on pages 5557 about Ms.pdf1 15 Points Read the Case Studies on pages 5557 about Ms.pdf
1 15 Points Read the Case Studies on pages 5557 about Ms.pdf
ย 

Recently uploaded

Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
ย 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
ย 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
ย 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
ย 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
ย 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
ย 
Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.
IsmaelVazquez38
ย 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
ย 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
ImMuslim
ย 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
ย 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
ย 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
ย 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
ย 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
ย 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
JomonJoseph58
ย 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
ย 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
ย 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
Celine George
ย 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
ย 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
ย 

Recently uploaded (20)

Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
ย 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
ย 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
ย 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
ย 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
ย 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
ย 
Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.
ย 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
ย 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
ย 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
ย 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
ย 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
ย 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
ย 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
ย 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
ย 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
ย 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
ย 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
ย 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
ย 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
ย 

1 7 Find the Order of Growth of the algorithm Procedure .pdf

  • 1. (1) 7. Find the Order of Growth of the algorithm. Procedure Foo (a1,a2,, an: distinct integers) even :=0 odd :=0; for x:=1 to n for y:=n downto 1 begin sum:=ax+ay if ( sum mod2=0) even := even +1 ; else odd := odd +1 ; end if (even >odd) return even; else return odd; (1) 8. Find the Order of Growth of the Algorithm. Procedure Foo(x: integer; a1,a2,,an : distinct integers) Low :=0; High :=n; mid :=( low + high )/2 while (amid!=x) begin if (x>amid) low := mid; else high := mid -1 ; mid := (low + high )/2 end return mid;