Making changes to code

Recreating the binary search method from book