Skip to content

[Gold5]_1240#21

Open
GeonwooShin wants to merge 1 commit intomainfrom
feat/DFS/1240
Open

[Gold5]_1240#21
GeonwooShin wants to merge 1 commit intomainfrom
feat/DFS/1240

Conversation

@GeonwooShin
Copy link
Owner

@GeonwooShin GeonwooShin self-assigned this Dec 21, 2023
Copy link
Collaborator

@f-lab-jake f-lab-jake left a comment

Choose a reason for hiding this comment

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

전체적으로 안좋은 패턴들이 많이 들어가있는데요.
코드의 많은 부분들이 서로서로 의존하고 있습니다.
어느 부분인지 아시겠나요? 그리고 이 코드에서 스스로 아쉬운점이 느껴지는게 있다면 한번 설명해봅시다.

@GeonwooShin
Copy link
Owner Author

a, b 배열을 통해 treenodes 배열을 새로 생성하고 있는 점, visited 배열을 새로 초기화 해주는 점이 서로 의존하고 있는 코드인 것 같습니다.

@f-lab-jake
Copy link
Collaborator

a, b 배열을 통해 tree와 nodes 배열을 새로 생성하고 있는 점,

요부분은 코드를 좀더 잘 짤순있겠지만, 초기화 로직이라서 그렇게 문제되진 않습니다. 초기화하고 안건드리고 있으니까요.

visited 배열을 새로 초기화 해주는 점이 서로 의존하고 있는 코드인 것 같습니다.

요부분은 정확하게 보았습니다.

비슷하게, answerDFS안에서 변경하고 있는게 안좋습니다. 이 문제들을 개선해봅시다.

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