-
Notifications
You must be signed in to change notification settings - Fork 1
[유병규-13주차 알고리즘 스터디] #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
유병규_13주차/[BOJ-23290] 마법사 상어와 복제.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
상어가 이동하는 경로를 DFS로 구현한 게 좋아보이네요,, 저는 삼중 반복문으로 짰는데 DFS 코드가 더 깔끔해보여요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
삼중 반복문으로도 해결할 수 있군요. 저는 dfs만 떠올라서 위와 같이 구현하였는데, 여러 해결 방법을 아는 것도 중요하다 생각해서 삼중 반복문도 참고해보겠습니다!
유병규_13주차/[BOJ-1507] 궁금한 민호.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
complete graph를 미리 만들어놓고 간선을 하나씩 제거하는 방법도 있었군요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 참고해서 해결한 문제인데, 모든 간선을 하나씩 제거했을 때 이 간선이 최단 거리를 위해서 반드시 필요한 간선인 지 확인하는 방법이 참신하다고 생각했습니다. 여러 간선을 조합과 같이 선택해서 확인하는 것이 아니라 각각의 간선을 확인해서 필요한 간선이면 제거하지 않고 다음 다리를 판단하는 것이 인상적인 풀이 방법이었습니다.
유병규_13주차/[BOJ-1561] 놀이 공원.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분을 PQ 없이 구현하면 조금 더 효율적인 코드가 될 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확실히 단순 정렬이라 PQ를 사용하지 않고 구현하는 것이 더 효율적인 것 같습니다! 당시에 드디어 풀었다는 기쁨에 당장 생각나는 방법으로 구현했었는데, 좀 더 차분히 문제를 푸는 연습이 필요한 것 같습니다. 리뷰 감사합니다!
🚀 싸피 15반 알고리즘 스터디 13주차 [유병규]
📌 문제 풀이 개요
✅ 문제 해결 여부
💡 풀이 방법
문제 1: 마법사 상어와 복제
문제 난이도
문제 유형
접근 방식 및 풀이
문제 2: 궁금한 민호
문제 난이도
문제 유형
접근 방식 및 풀이
문제 3: 놀이 공원
문제 난이도
문제 유형
접근 방식 및 풀이
문제 4: BFS 스페셜 저지
문제 난이도
문제 유형
접근 방식 및 풀이
[[1], [2, 3], [4], [], []]와 같다면 이는 첫 번째 나올 수 있는 정점은1, 두 번째는2와3, 세 번째는4라는 의미입니다. 이 순서 집합을 생성한 뒤 입력 값의 순서가 위 순서 집합에 해당하는 지 판단하여 문제를 해결하였습니다.문제 5: 청소년 상어
문제 난이도
문제 유형
접근 방식 및 풀이
문제 6: 시계 사진들
문제 난이도
문제 유형
접근 방식 및 풀이