How would you check a BST?
Anonymous
public boolean checkBst(Node n) { if (n == null) return true; if (checkBst(n.left)) { if ( checkBst(n.right)) { boolean isBst = false; if (n.left != null){ isBst = n.left.data n.data; } return isBst; } } return false; }
Check out your Company Bowl for anonymous work chats.