Skip to content

Conversation

@EmilyPaek
Copy link

📘 풀이한 문제

⭐ 문제에서 주로 사용한 알고리즘
  • BFS, 구현

📜 대략적인 코드 설명
  • 반시계, 시계방향으로 회전할 때 톱니의 위치가 바뀌는 부분을 deque를 사용해 구현했습니다.
  • recursive로 양 옆 톱니바퀴를 확인하면서 다른 극이 맞닿아 있는 톱니바퀴를 회전시켰습니다.
  • 한 번 확인한 톱니바퀴는 다시 확인하지 않도록 boolean 배열을 만들어 체크해나갔습니다.
  • 시간복잡도 : Θ(K)

@jjangsungwon jjangsungwon merged commit b5fde4f into CodeTest-StudyGroup:master Oct 5, 2020
@EmilyPaek EmilyPaek deleted the seungbin branch October 5, 2020 02:10
@jjangsungwon jjangsungwon added the problem-solved Indication that this problem is solved label Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

problem-solved Indication that this problem is solved

2 participants