• + 0 comments

    But the space complexity is not O(1) but O(n) on any input...