Shifted Binary Search Leetcode Problems Python