Skip to content

Conversation

@Da-Hye-JUNG
Copy link
Collaborator

📌 푼 문제들

  • 문제 1 청소년 상어

📝 간단한 풀이 과정

문제 1

  • bfs로 풀이
  • 전체 물고기 이동, 상어 위치 이동 함수 구현

🙌 궁금한 점

  • DFS를 이용하여 상어가 먹을 수 있는 물고기들을 재귀함수로 구현하려다 코드가 복잡해져서 BFS로 노선을 변경했는데 더 복잡해지네요 ㅎㅎ 피어세션 전까지 완성 못할것 같아 미완성상태로 일단 올립니다. 커멘트 생략해주시면 됩니다.

Copy link
Member

@JLake310 JLake310 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20번 줄에서 22번 줄까지 방향을 전환하는 부분에서는, cur_dir = (dir + i) % 8 과 같은 방식으로 구하면 더 간결하게 구할 수 있을 것 같습니다,,! 또한 방향 전환도 dr과 dc, direc을 함께 활용하면 더 간결해질 수 있지 않을까 싶네요 :)

고생하셨어요 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants