12345678910111213141516171819202122232425262728293031323334 |
- /*
- // 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);
- }
-
- }
- }
|