-
Notifications
You must be signed in to change notification settings - Fork 4
[25주차] 이지영 #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[25주차] 이지영 #339
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
섬이 1밖에 없을 때랑 리프노드 판단하는거 이렇게 하면 되는거였군요...
저는 if문 떡칠해버렸는데 배워갑니돠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d 방향으로 이동이 불가능하면 이 과정이 없어도 될 것 같다고 생각하는데, 왜 있는지 궁금합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7 7
*******
*******
*******
***.***
*******
*******
*******
d방향으로 움직일 수 없는 경우 0으로 시작하면 이후 탐색에서 움직을 수 있는 방향을 찾아 단계1로 시작되도록 했습니다. 이는 위 테스트케이스 처럼 움직일 수 있는 곳이 딱 1칸일 경우는 시작하자마자 종료되기 때문에 최소 이동횟수가 0이되야하는데 아예 탐색을 안하면 -1이되기 때문에 탐색을 진행해서 최소 움직임 횟수를 0으로 출력하도록 하기 위해 작성했습니다.
아 그리고 주석에 단계2부터 시작은 오타입니다,,, ᄒᄒᄒ 단계 0부터 시작입니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 무조건 3차원 배열로 풀어야 된다고 생각했는데,, 이 아이디어를 생각하는게 너무 어려운 것 같습니다..
No description provided.