• + 0 comments

    hi can you explain how it is taking O(1) space when you are using :

    int[] a = new int[n];
    
        That will aquire a space of O(1)