JAVA_LeetCode 116_Populating Next Right Pointers in Each Node 풀이 class Solution { public Node connect(Node root) { if (root == null) return null; connectNodes(root.left, root.right); return root; } private void connectNodes(Node left, Node right){ // 노드별 맨 끝자리는 결국 null이 들어감('#'는 시각적 표시로 인해 보여지는 것) if(left == null || right == null) return; // 같은 부모 내의 왼쪽 자식과 오른쪽 자식을 연결 left.next = right; // 왼쪽 자식의 오른쪽과 오른쪽 자식의 왼쪽을 연결 (부모가 다른 경우) connectNodes(left.right, right.left); // 재귀로 각 자식 내부 연결 connectNodes...