@Test public void shouldReturnFalseIfLeftNodesAreGraterThanRightNodesRecursive() { BinaryNode<Integer> root = new BinaryNode<Integer>(0); BinaryNode<Integer> n1 = new BinaryNode<Integer>(1); BinaryNode<Integer> n2 = new BinaryNode<Integer>(2); root.setLeft(n2); root.setRight(n1); assertFalse(isBST.checkRecursive(root)); }
public boolean checkRecursive(BinaryNode<Integer> root) { validateInput(root); return checkRecursiveInner(root); }
IsBST { public boolean checkRecursive(BinaryNode<Integer> root) { validateInput(root); return checkRecursiveInner(root); } }
IsBST { public boolean checkRecursive(BinaryNode<Integer> root) { validateInput(root); return checkRecursiveInner(root); }  }
IsBST { public boolean checkRecursive(BinaryNode<Integer> root) { validateInput(root); return checkRecursiveInner(root); }  boolean checkRecursive(BinaryNode<Integer> root); boolean checkIterative(BinaryNode<Integer> root); }
IsBST { public boolean checkRecursive(BinaryNode<Integer> root) { validateInput(root); return checkRecursiveInner(root); }  boolean checkRecursive(BinaryNode<Integer> root); boolean checkIterative(BinaryNode<Integer> root);  }