Question: Write a recursive method isBinaryTree() that takes a Node as an argument and returns true if the subtree count field N is consistent in the
Write a recursive method isBinaryTree() that takes a Node as an argument and returns true if the subtree count field N is consistent in the data structure rooted at that node, false otherwise.
This is my code.

This is the test. My code failed at the highlighted code.

This is the additional code that showed the resource code of updateN()

How do do this problem?
public class Node , Value> Key key; // key Value val; // associated value NodeKey, Value> left, right; // links to subtrees static int lastvalue = Integer.MIN.VALUE; in n; // # nodes in subtree rooted here public Node (Key key, Value val, int n) this.keykey; this.val-val; k 3 @param node root of the sub-tree @return true if for each node in the sub-tree, n field value matches the number of nodes in its sub-tree, otherwise false public static boolean isBinaryTree(Node node) { return isBST (node, null, null); public static , Value boolean isBST (Node node, Key low, Key high) if (nodenul1) ( return true; if (lownull && low.compareTo(node.key) ) return false if (high != null && high . compareTo(node . key) 0) { return Talse return isBST (node.left, low, node.key) && isBST(node.right, node.key, high); public class Node , Value> Key key; // key Value val; // associated value NodeKey, Value> left, right; // links to subtrees static int lastvalue = Integer.MIN.VALUE; in n; // # nodes in subtree rooted here public Node (Key key, Value val, int n) this.keykey; this.val-val; k 3 @param node root of the sub-tree @return true if for each node in the sub-tree, n field value matches the number of nodes in its sub-tree, otherwise false public static boolean isBinaryTree(Node node) { return isBST (node, null, null); public static , Value boolean isBST (Node node, Key low, Key high) if (nodenul1) ( return true; if (lownull && low.compareTo(node.key) ) return false if (high != null && high . compareTo(node . key) 0) { return Talse return isBST (node.left, low, node.key) && isBST(node.right, node.key, high)