Leetcode Constraints Time Complexity Chartswap