3 ms·It's O(1) space complexity but O(n) time complexity.by quanticle 11y agoIt's O(1) space complexity but O(n) time complexity.nice_byte 11y agoOh sorry, that's right, I just assumed parent was referring to time.