Leetcode 399 Python Algorithm To Estimate