- Write a function called BinarySearch which takes in 2 parameters: a sorted array and the search key. Without utilizing any of the built-in methods available to your language, return the index of the array’s element that is equal to the value of the search key, or -1 if the element is not in the array.
- NOTE: The search algorithm used in your function should be a binary search.
- Write out problem statement
- Looked at past challenge that used middle split
- wrote test cases with given and output
- wrote algorithm that follows basic test case
- drew image that follows that algorithm
- wrote solution on replit
- The Big O time is O(log n) and space is O(1)
