v8 time O(1) space O(1) Accepted