@@ -0,0 +1,863 @@
+/**%0A * Problem Link: https://leetcode.com/problems/flatten-binary-tree-to-linked-list/%0A * %0A * Definition for a binary tree node.%0A * public class TreeNode %7B%0A *     int val;%0A *     TreeNode left;%0A *     TreeNode right;%0A *     TreeNode(int x) %7B val = x; %7D%0A * %7D%0A */%0Apublic class Solution %7B%0A    public void flatten(TreeNode root) %7B%0A        if(root == null) return;%0A        Stack%3CTreeNode%3E stack = new Stack%3CTreeNode%3E();%0A        TreeNode r = new TreeNode(0);%0A        TreeNode next = r;%0A        stack.push(root);%0A        while(stack.empty() == false) %7B%0A            TreeNode node = stack.pop();%0A            if(node.right != null) stack.push(node.right);%0A            if(node.left != null) stack.push(node.left);%0A            %0A            next.right = node;%0A            next.left = null;%0A            next = next.right;%0A            %0A        %7D%0A        root = r.right;%0A    %7D%0A%7D%0A

Create Flatten_Binary_Tree_to_Linked_List.java