Skip to content

Commit ff24b3a

Browse files
enable EmptyLineSeparator check
1 parent 9b7d9f5 commit ff24b3a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+73
-19
lines changed

fishercoder_checkstyle.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@
9292
<module name="FallThrough"/>
9393
<module name="UpperEll"/>
9494
<module name="ModifierOrder"/>
95-
<!--<module name="EmptyLineSeparator">-->
96-
<!--<property name="allowNoEmptyLineBetweenFields" value="true"/>-->
97-
<!--</module>-->
95+
<module name="EmptyLineSeparator">
96+
<property name="allowNoEmptyLineBetweenFields" value="true"/>
97+
</module>
9898
<!--<module name="SeparatorWrap">-->
9999
<!--<property name="tokens" value="DOT"/>-->
100100
<!--<property name="option" value="nl"/>-->

src/main/java/com/fishercoder/common/utils/BTreePrinter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ private static Node<Integer> test2() {
173173

174174

175175
public static class Node<T extends Comparable<?>> {
176-
Node<T> left, right;
176+
Node<T> left;
177+
Node<T> right;
177178
T data;
178179

179180
public Node(T data) {

src/main/java/com/fishercoder/common/utils/TreeUtils.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/**
2-
*
3-
*/
41
package com.fishercoder.common.utils;
52

63
import com.fishercoder.common.classes.TreeNode;

src/main/java/com/fishercoder/solutions/_118.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.fishercoder.solutions;
2+
23
import java.util.*;
34

45
/**

src/main/java/com/fishercoder/solutions/_119.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.fishercoder.solutions;
2+
23
import java.util.*;
34

45
/**

src/main/java/com/fishercoder/solutions/_124.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
public class _124 {
2323

2424
int max = Integer.MIN_VALUE;
25+
2526
public int maxPathSum(TreeNode root) {
2627
dfs(root);
2728
return max;

src/main/java/com/fishercoder/solutions/_138.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ public RandomListNode copyRandomList(RandomListNode head) {
3535
// Definition for singly-linked list with a random pointer.
3636
class RandomListNode {
3737
int label;
38-
RandomListNode next, random;
38+
39+
RandomListNode next;
40+
RandomListNode random;
3941

4042
RandomListNode(int x) {
4143
this.label = x;

src/main/java/com/fishercoder/solutions/_140.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.fishercoder.solutions;
2+
23
import java.util.*;
34
/**
45
* Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.

src/main/java/com/fishercoder/solutions/_141.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/**
2-
*
3-
*/
41
package com.fishercoder.solutions;
52

63
import com.fishercoder.common.classes.ListNode;

src/main/java/com/fishercoder/solutions/_146.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ public void set(int key, int value) {
6767

6868
public class DoublyLinkedListPlusHashMapSolution {
6969
private class Node {
70-
int key, value;
71-
DoublyLinkedListPlusHashMapSolution.Node prev, next;
70+
int key;
71+
int value;
72+
73+
DoublyLinkedListPlusHashMapSolution.Node prev;
74+
DoublyLinkedListPlusHashMapSolution.Node next;
7275

7376
Node(int k, int v) {
7477
this.key = k;
@@ -83,7 +86,8 @@ private class Node {
8386

8487
private int capacity;
8588
private int count;
86-
private DoublyLinkedListPlusHashMapSolution.Node head, tail;
89+
private DoublyLinkedListPlusHashMapSolution.Node head;
90+
private DoublyLinkedListPlusHashMapSolution.Node tail;
8791
private Map<Integer, DoublyLinkedListPlusHashMapSolution.Node> map;
8892
// ATTN: the value should be Node type! This is the whole point of having a class called Node!
8993

0 commit comments

Comments
 (0)