Recursive Function For Binary Search Leetcode Problems Python