public static TreeNode getLCA1(TreeNode root, TreeNode p, TreeNode q) {
        if(root == null || p == null || q == null) return null;
        if(root == p || root == q) return root;

        int count = getMatchCount(root.left, p, q);
        if(count == 1)
            return root;
        else if(count == 0)
            return getLCA1(root.right, p, q);
        else
            return getLCA1(root.left, p, q);
    }