diff options
author | Michael Hunteman <michael@huntm.net> | 2022-10-01 19:05:51 -0500 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2022-10-01 19:05:51 -0500 |
commit | 3cf6cd56951542e9096d0ca58fc332053c3f74c2 (patch) | |
tree | 8a3d58acccb451ee797f1dd2b800dea30a009522 /node/TreeNode.java | |
parent | 27cd471ef172362cfdf8621c0c9a1c4edd35863e (diff) |
Add Max Depth of Tree
Diffstat (limited to 'node/TreeNode.java')
-rw-r--r-- | node/TreeNode.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/node/TreeNode.java b/node/TreeNode.java new file mode 100644 index 0000000..b820151 --- /dev/null +++ b/node/TreeNode.java @@ -0,0 +1,19 @@ +package node; + +import java.lang.*; +import java.util.*; + +public class TreeNode { + public int val; + public TreeNode left; + public TreeNode right; + public TreeNode() {} + public TreeNode(int val) { + this.val = val; + } + public TreeNode(int val, TreeNode left, TreeNode right) { + this.val = val; + this.left = left; + this.right = right; + } +} |