17 lines
361 B
C#
17 lines
361 B
C#
namespace _144._Binary_Tree_Preorder_Traversal;
|
|
|
|
|
|
//Definition for a binary tree node.
|
|
public class TreeNode
|
|
{
|
|
public int val;
|
|
public TreeNode? left;
|
|
public TreeNode? right;
|
|
public TreeNode(int val = 0, TreeNode? left = null, TreeNode? right = null)
|
|
{
|
|
this.val = val;
|
|
this.left = left;
|
|
this.right = right;
|
|
}
|
|
}
|