114. Flatten Binary Tree to Linked List

This commit is contained in:
2026-03-25 23:18:30 +03:00
parent a8727e17a1
commit 6b483ea6d1
5 changed files with 131 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
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;
}
}