Leetcode Constraints Time Complexity Chartswap Pay