-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathMaximumDepthofBinaryTree.cs
More file actions
45 lines (29 loc) · 1.81 KB
/
MaximumDepthofBinaryTree.cs
File metadata and controls
45 lines (29 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Source : https://leetcode.com/problems/maximum-depth-of-binary-tree/description/
// Author : codeyu
// Date : 2017年11月29日 19:12:09
/**********************************************************************************
*
* Given a binary tree, find its maximum depth.
*
* The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
*
**********************************************************************************/
using System;
using System.Collections.Generic;
using Algorithms.Utils;
namespace Algorithms
{
/**
* Definition for a binary tree node.
* public class TreeNode {
* public int val;
* public TreeNode left;
* public TreeNode right;
* public TreeNode(int x) { val = x; }
* }
*/
public class Solution104 {
public static int MaxDepth(TreeNode root) {
throw new NotImplementedException("TODO");
}
}}