Leetcode Constraints Time Complexity