Skip to content

Conversation

@YOONMINWOOK
Copy link
Contributor

  1. Algorithm
  • using double loop to search all map array.
  • using recursive function(dfs) to find all cases.
  1. Time Complexity
  • i searched all array entities so O(n^2).
  • i repeated solution function recursively, and each case has 4 cases so O(4^n).

i used CCTV class which has its directions array, rotation function, and inspection function.
i used common dfs to solve this problem.
i used CCTV class which has its directions array, rotation function, and inspection function.
i used common dfs to solve this problem.
Copy link
Contributor

Choose a reason for hiding this comment

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

이렇게 상수 정의해서 하는거 좋음!(디버깅할때도 편함)

Copy link
Contributor

Choose a reason for hiding this comment

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

재귀함수 안에서 배열 선언되면 깊이 못들어가는건 설명했으니까 알거고,
대안으로 이런걸 전역변수로 선언해서 재활용하는걸 공부하면 좋을듯

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.

2 participants