Based on a LeetCode problem solution, I am practicing making binary search algorithms. I wrote this below, using a mix of the code from the LeetCode solution, and new code.