로딩
요청 처리 중입니다...

JAVA_Binary Tree Paths_LeetCode 257

 JAVA_Binary Tree Paths_LeetCode 257

JAVA_Binary Tree Paths_LeetCode 257 풀이 class Solution { public List binaryTreePaths(TreeNode root) { List answer = new ArrayList(); if (root != null) searchBT(root, "", answer); return answer; } private void searchBT(TreeNode root, String path, List answer) { if (root.left == null && root.right == null) answer.add(path + root.val); if (root.left !

= null) searchBT(root.left, path + root.val + "->", answer); if (root.right != null) searchBT(root.right, path + root.v...

# BinaryTreePaths_LeetCode257 # JAVA # JAVA_BinaryTreePaths # JAVA_BinaryTreePaths_LeetCode257 # JAVA_LeetCode257