Leetcode 399 Python Optimize Root Car