LeetCode: partition list, max rectangle