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.