It 's showing 100% faster than others.(Doubt)?
for(int i=1;i<nums.length;i++){
            nums[i] = nums[i-1]+ nums[i];
        }return nums;

want to know, can we iterate an array without knowing the length of the array.

Comments (0)