Example #1
0
 public void Can_Get_Leaves_Count_Of_Many()
 {
     int[] array = { 9, 5, 1, 14, 6 };
     var tree = new BinaryTree();
     tree.Init(array);
     Assert.AreEqual(3, tree.Leaves());
 }
Example #2
0
 public void Can_Get_Leaves_Count_Of_1()
 {
     var tree = new BinaryTree();
     tree.Add(7);
     Assert.AreEqual(1, tree.Leaves());
 }