-
Notifications
You must be signed in to change notification settings - Fork 5
240702 장태용 0x09 풀이 #39
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
Conversation
0x09/장태용/그림_BFS.java
Outdated
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.
상하좌우에 대한 행동에 대한 제어문 과정에서 try catch 를 사용한 것이
인상깊네요 혹시 이유가 있을까요?
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.
nx , ny 의 범위를 설정해주는 이유는 index 에러를 방지하기 위해 설정하지만
저는 인덱스가 N+1, 또는 -1이 될 때 Exception이 발생하기 때문에 이렇게 풀었습니다.
결론 : 범위설정하기 귀찮아서
0x09/장태용/유기농_배추_BFS.java
Outdated
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.
map 안에 2라는 변수가 들어갈 수 있나요..?
어떤 방식인지 이해가 안되네요
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.
저는 기존 0, 1 로 이루어진 map에서 방문했따면 2로 설정했습니다.
0x09/장태용/적록색약_DFS.java
Outdated
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.
적록색약인 경우와 아닌 경우를 각각 배열을 미리 선언한 후 반복문을 두 번 돌리시는 방식으로 해결하셨네요!
저도 비슷한데, 저는 변수는 그대로 쓰고 적록색약인 경우엔 R을 G로 다 repalce해서 해결했어요
잘보고갑니다.
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.
제가 젤 무식하게 푼 거같아여 ㅋㅋㅋ
0x09/장태용/텀_프로젝트_BFS.java
Outdated
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.
전 ,visited와 finished 비열을 boolean 값을 주어 계산하였는데
그냥 0,1 을 통해 계산을 할 수도 있겠네요
그리고 개인적으로 반복문이 많을 경우 닫히는 부분에
주석을 달아 두면 좀 더 읽기 편한 것 같아요! 개인적인 의견입니다
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.
그 혹시 제꺼 어려우시면 블로그 한번 참조 부탁드립니다.
No description provided.