File tree Expand file tree Collapse file tree 1 file changed +5
-17
lines changed
src/main/java/g0401_0500/s0427_construct_quad_tree Expand file tree Collapse file tree 1 file changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,6 @@ public class Node {
99 public Node bottomLeft ;
1010 public Node bottomRight ;
1111
12- public Node () {
13- this .val = false ;
14- this .isLeaf = false ;
15- this .topLeft = null ;
16- this .topRight = null ;
17- this .bottomLeft = null ;
18- this .bottomRight = null ;
19- }
20-
2112 public Node (boolean val , boolean isLeaf ) {
2213 this .val = val ;
2314 this .isLeaf = isLeaf ;
@@ -44,14 +35,11 @@ public Node(
4435
4536 @ Override
4637 public String toString () {
47- if (topLeft != null && topRight != null && bottomLeft != null && bottomRight != null ) {
48- return getNode (this )
49- + getNode (topLeft )
50- + getNode (topRight )
51- + getNode (bottomLeft )
52- + getNode (bottomRight );
53- }
54- return "" ;
38+ return getNode (this )
39+ + getNode (topLeft )
40+ + getNode (topRight )
41+ + getNode (bottomLeft )
42+ + getNode (bottomRight );
5543 }
5644
5745 private String getNode (Node node ) {
You can’t perform that action at this time.
0 commit comments