• + 1 comment

    How is that O(1) space? You're using an n element array.