이 글은 "파이썬 알고리즘 인터뷰 (박상길 지음)"을 읽고 주관적으로 요약한 글입니다. 문제 정의 트리의 최대 깊이 출력 책에서 구현된 코드 def maxDepth(self, root: TreeNode) -> int: if root is None: return 0 queue = collections.deque([root]) depth = 0 while queue: depth += 1 # 큐 연산 추출 노드의 자식 노드 삽입 for _ in range(len(queue)): cur_root = queue.popleft() if cur_root.left: queue.append(cur_root.left) if cur_root.right: queue.append(cur_root.right) # BFS 반복 횟..