Jump Game Problem Leetcode Python