Esempio n. 1
0
 @Test
 public void startEqualsEnd() {
   Node<Integer> aux = TreeUtils.createBSTFromRange(5, 5);
   assertTrue(TreeUtilsTest.rootWithNoChild(aux));
 }
Esempio n. 2
0
 @Test
 public void isBST() {
   assertTrue(TreeUtilsTest.isBST(TreeUtils.createBSTFromRange(0, 9)));
   assertTrue(TreeUtilsTest.isBST(TreeUtils.createBSTFromRange(5, 9)));
   assertTrue(TreeUtilsTest.isBST(TreeUtils.createBSTFromRange(0, 2)));
 }