Pgadmin Binary Search Leetcode Solution Python