JAVA_Construct String from Binary Tree_LeetCode 606 풀이 class Solution { public String tree2str(TreeNode root) { if(root == null) return ""; if(root.left==null && root.right==null) return root.val + ""; if(root.right == null) return root.val + "(" + tree2str(root.left) + ")"; return root.val + "(" + tree2str(root.left) + ")(" + tree2str(root.right) + ")"; } } * 출처 Construct String from Binary Tree - LeetCode Construct String from Binary Tree - Given the root of a binary tree, construct a string c...
#ConstructStringfromBinaryTree_LeetCode606
#JAVA
#JAVA_ConstructStringfromBinaryTree
#JAVA_ConstructStringfromBinaryTree_LeetCode606
#JAVA_LeetCode606
원문링크 : JAVA_Construct String from Binary Tree_LeetCode 606