Skip to content

Commit 14d3af6

Browse files
author
holmir97
committed
배열 더하기
1 parent 85d43f1 commit 14d3af6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

SumOfArray.java

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
public class SumOfArray {
2+
public int[] runningSum(int[] nums) {
3+
for (int i = 0; i < nums.length - 1; i++)
4+
nums[i + 1] += nums[i];
5+
return nums;
6+
}
7+
}

0 commit comments

Comments
 (0)