Binary Search Problems Leetcode Python