Skip to content

Conversation

ijlijijij
Copy link
Contributor

@ijlijijij ijlijijij commented Oct 18, 2024

답안 제출 문제

체크 리스트

  • PR을 프로젝트에 추가하고 Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 Status를 In Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@github-actions github-actions bot added the py label Oct 18, 2024
@ijlijijij ijlijijij requested a review from jdalma October 18, 2024 18:40
@ijlijijij ijlijijij marked this pull request as ready for review October 18, 2024 18:41
@ijlijijij ijlijijij requested a review from a team as a code owner October 18, 2024 18:41
Copy link
Member

@jdalma jdalma left a comment

Choose a reason for hiding this comment

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

한 주 동안 수고하셨습니다!


for next_node in graph[node]:
reachable[next_node] -= 1
if next_node not in visited and reachable[next_node] == 0:
Copy link
Member

Choose a reason for hiding this comment

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

All the pairs prerequisites[i] are unique. 이 입력 조건 덕분에 방문한 노드를 재방문하는 케이스는 없을 것 같다고 생각됩니다
그래서 visited set 없이 접근한 노드들의 카운트만으로 풀 수 있지 않을까 싶습니다 ㅎㅎ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

제가 놓친 부분에 대해서 알려주셔서 감사합니다!

@ijlijijij ijlijijij merged commit bd5bb4f into DaleStudy:main Oct 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

2 participants