why the space complexity is O(1)?

Hi All,
I am new to algorithms.
In the below code how the space complexity is O(1).

public int[] runningSum(int[] nums) {
        int i = 1;
        while (i<nums.length){
            nums[i]+=nums[i-1];
            i++;
        }
        return nums;
    }
	
	```
	If there are n positions should be filled with data then the complexity should be O(n) right or any other way to analyze. 
	
	problem No: 1480. Running Sum of 1d Array
	
Comments (2)