Created
August 17, 2018 15:01
-
-
Save yohey03518/2755d7efbdb58b02785a307a9400606b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void RootHasLeftChild_Return2() | |
{ | |
No104_MaximumDepthofBinaryTree.TreeNode root = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
root.left = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
int depth = solution.MaxDepth(root); | |
Assert.AreEqual(2, depth); | |
} | |
[TestMethod] | |
public void RootHasRightChild_Return2() | |
{ | |
No104_MaximumDepthofBinaryTree.TreeNode root = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
root.right = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
int depth = solution.MaxDepth(root); | |
Assert.AreEqual(2, depth); | |
} | |
[TestMethod] | |
public void RootHasBothChild_Return2() | |
{ | |
No104_MaximumDepthofBinaryTree.TreeNode root = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
root.left = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
root.right = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
int depth = solution.MaxDepth(root); | |
Assert.AreEqual(2, depth); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment