강의

멘토링

커뮤니티

Inflearn Community Q&A

takartin2287's profile image
takartin2287

asked

Introduction to Java Algorithm Problem Solving: Coding Test Preparation

7. Binary Tree Level Traversal (BFS: Breadth-First Search)

Node cur 부분 이해가 안가네요

Written on

·

283

0

for 문 안에 Node cur에 Q.poll(); 로 1 하나 넣어줬기 때문에 밑에서 cur.lt랑 cur.rt는 값이 아직 없어야 하는거 아닌가요?

java코테 준비 같이 해요!

Answer 2

1

main 메서드에서 1~7 까지 미리 넣어줬기 때문에 

cur.lt, cur.rt는 이미 할당되어 있습니다

1

codingcamp님의 프로필 이미지
codingcamp
Instructor

안녕하세요^^

영상의 몇분 지점이 이해가 안가는지 알려주시면 좋겠습니다.

takartin2287's profile image
takartin2287

asked

Ask a question