Postorder1 [Algorithm][개념 정리] Binary Tree Traveral - InOrder, PreOrder, PostOrder TreeNode 예제 public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode() {} TreeNode(int val) { this.val = val; } TreeNode(int val, TreeNode left, TreeNode right) { this.val = val; this.left = left; this.right = right; } } InOrder 조회 순서 왼쪽 -> 자신 -> 오른쪽 private void treeNodeTraversal(TreeNode node) { treeNodeTraversal(node.left); System.out.println(node.val); treeNodeTraversal(node... 2022. 9. 30. 이전 1 다음