Created
August 17, 2018 15:14
-
-
Save yohey03518/ee8bc9db733f87b53cd6ae1150b904b2 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 Tree11101010010_Return4() | |
{ | |
No104_MaximumDepthofBinaryTree.TreeNode root = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
root.left = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
root.right = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
root.left.right = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
root.right.right = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
root.left.right.left = new No104_MaximumDepthofBinaryTree.TreeNode(1); | |
int depth = solution.MaxDepth(root); | |
Assert.AreEqual(4, depth); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment