Maximum Erasure Value Leetcode Solutions Python