Leetcode Implement Dynamic Pricing Algorithms And Complexity