Skip to content

Commit ed36098

Browse files
authored
Update NPower3By2Complexity.java
1 parent 1408ac0 commit ed36098

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/chapter01introduction/NPower3By2Complexity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ public static void main(String[] args) {
2121
System.out.println(nPower3By2(n));
2222
}
2323
public static int nPower3By2(int n){
24-
int i=1, j;
24+
int i = 1, j;
2525
int count = 0;
2626
int sum = 0;
27-
for (i = 0; i <n; i++){
27+
for (i = 0; i < n; i++){
2828
j = 0;
29-
while(sum<i){
29+
while(sum < i){
3030
sum = sum + j;
3131
j++;
3232
count++;

0 commit comments

Comments
 (0)