Skip to content

Commit 7ac1c12

Browse files
author
AmiyahJo
committed
fix: githubs recoomendation to avoid violations
1 parent a75ae55 commit 7ac1c12

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

lesson_12/structs_java/structs_app/src/main/java/com/codedifferently/lesson12/Lesson12.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ public String gameResult(ListNode head) {
99

1010
ListNode current = head;
1111

12-
while (current != null && current.next != null) {
13-
if (current.val > current.next.val){
14-
evenPoints++;
15-
} else if (current.val < current.next.val){
16-
oddPoints++;
17-
}
18-
current = current.next.next;
12+
while (current != null && current.next != null) {
13+
if (current.val > current.next.val) {
14+
evenPoints++;
15+
} else if (current.val < current.next.val) {
16+
oddPoints++;
1917
}
18+
current = current.next.next;
19+
}
2020

21-
if (oddPoints > evenPoints) {
22-
return "Odd";
23-
} else if (evenPoints > oddPoints){
24-
return "Even";
25-
} else {
26-
return "Tie";
27-
}
21+
if (oddPoints > evenPoints) {
22+
return "Odd";
23+
} else if (evenPoints > oddPoints) {
24+
return "Even";
25+
} else {
26+
return "Tie";
27+
}
2828
}
2929
}

lesson_12/structs_java/structs_app/src/main/java/com/codedifferently/lesson12/Stack.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ public void push(int value) {
1818

1919
public int pop() {
2020
if (isEmpty()) {
21-
throw new EmptyStackException();
21+
throw new EmptyStackException();
2222
} else {
23-
int value = top.val;
24-
top = top.next;
25-
return value;
23+
int value = top.val;
24+
top = top.next;
25+
return value;
2626
}
2727
}
2828

0 commit comments

Comments
 (0)