dengxinyi 6 years ago
parent
commit
3432646f9e
1 changed files with 34 additions and 0 deletions
  1. 34 0
      easy/558.quad-tree-intersection.java

+ 34 - 0
easy/558.quad-tree-intersection.java

@@ -0,0 +1,34 @@
+/*
+// Definition for a QuadTree node.
+class Node {
+    public boolean val;
+    public boolean isLeaf;
+    public Node topLeft;
+    public Node topRight;
+    public Node bottomLeft;
+    public Node bottomRight;
+
+    public Node() {}
+
+    public Node(boolean _val,boolean _isLeaf,Node _topLeft,Node _topRight,Node _bottomLeft,Node _bottomRight) {
+        val = _val;
+        isLeaf = _isLeaf;
+        topLeft = _topLeft;
+        topRight = _topRight;
+        bottomLeft = _bottomLeft;
+        bottomRight = _bottomRight;
+    }
+};
+*/
+class Solution {
+    public Node intersect(Node quadTree1, Node quadTree2) {
+        
+    }
+
+    private Node helper(Node node1, Node node2) {
+        if (node1.isLeaf && node2.isLeaf) {
+            return new Node(node1.val || node2.val, true, null, null, null, null);
+        }
+        
+    }
+}