예제 #1
0
 static void TestSecondMinNodeInBinaryTree()
 {
     int?[] nums = new int?[] { 2, 2, 5, null, null, 5, 7 };
     nums = new int?[] { 2, 2, 2 };
     TreeNode root = TreeUtil.BuildTree(nums);
     var      ret  = Second_Minimum_Node_In_a_Binary_Tree.FindSecondMinimumValue(root);
 }
예제 #2
0
 static void TestBinaryTreeLevelTraver()
 {
     int?[]   nums = new int?[] { 3, 9, 20, null, null, 15, 7 };
     TreeNode root = TreeUtil.BuildTree(nums);
     var      ret  = Binary_Tree_Level_Order_Traversal_II.Solution2(root);
 }
예제 #3
0
 static void TestSubtree_of_Another_Tree()
 {
     TreeNode s   = TreeUtil.BuildTree(new int?[] { 3, 4, 5, 1, 2 });
     TreeNode t   = TreeUtil.BuildTree(new int?[] { 4, 1, 2 });
     var      ret = Subtree_of_Another_Tree.IsSubtree(s, t);
 }