Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yohey03518/ee8bc9db733f87b53cd6ae1150b904b2 to your computer and use it in GitHub Desktop.
Save yohey03518/ee8bc9db733f87b53cd6ae1150b904b2 to your computer and use it in GitHub Desktop.
[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