Leetcode Implement Dynamic Pricing Algorithms In Python