Binary Tree, Data Structure Algorithm, Algorithms, Dotnet, Csharp.
Nodes 3, 4 and 6 are the leaf nodes. TreeNode This is a representation of a TreeNode class in C#: 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;