Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
2 views1 page

Binary Search Assignment Questions

Uploaded by

Nelly Chantal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Binary Search Assignment Questions

Uploaded by

Nelly Chantal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment: Binary Search

1. Write in your own words what binary search means.

2. Why must the list be sorted before using binary search?

3. If the sorted list is: 3, 7, 12, 18, 25, 30


Use binary search to find the number 18. Show the steps.

4. If the sorted list is: 5, 10, 15, 20, 25, 30


Use binary search to find the number 22. What happens?

5. Compare binary search with linear search. Which one is faster for long lists? Why?

6. Give two advantages of using binary search.

7. Give two disadvantages of using binary search.

8. Write a simple pseudo code for binary search in steps.

You might also like