-
Notifications
You must be signed in to change notification settings - Fork 7
[김동하-11주차 알고리즘 스터디] #75
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
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.
구조화가 잘 되어있어서 재밌게 리뷰했습니다! 갓동하 화이팅👏
김동하/11주차/[백준 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.
변수나 함수 이름이 직관적이고 구조가 잘 짜여있어서 좋았습니다! 물고기 냄새가 없는 부분이 5라는 점 같이 코드를 직접 짜지 않은 이상 알기 어려운 부분은 주석을 덧붙여주면 더 좋을 것 같아요!
public static int maxCnt = 0; | ||
public static List<SharkMove> sharkMoves; | ||
|
||
public static void findMove(Fish n,int cnt, int idx, List<Integer> dirs) { |
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.
상좌하우 순으로 탐색을 했으면 사전순으로 확인하게 되는 것이기 때문에 먹은 물고기 개수가 업데이트 되었을 때 경로를 업데이트하는 식으로 구현하면 로직이 더 간단해질 것 같아용
김동하/11주차/[백준 2352] 반도체 설계.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.
이진탐색을 활용한 LIS를 적용하면 시간복잡도를 O(NlogN)으로 줄일 수 있습니다!
이 문제랑 똑같아요: https://www.acmicpc.net/problem/12015
while(!q.isEmpty()) { | ||
int cur = q.poll(); | ||
visited[cur] = true; | ||
for(int next : list[cur]) { | ||
degree[next]--; | ||
if(degree[next] == 0) { | ||
q.add(next); | ||
} | ||
} | ||
} |
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.
차수가 0인 노드만 큐에 들어가니까 cycle 배열을 관리하는 대신 poll() 할 때마다 값을 카운팅해줘도 될 것 같아요
🚀 싸피 15반 알고리즘 스터디 11주차 [김동하]
📌 문제 풀이 개요
✅ 문제 해결 여부
💡 풀이 방법
문제 1: 문제 이름
(문제 이름은 현재 문제에 맞게 바꿔주세요! 바꾸시고 이 문장을 지워주세요.)
문제 난이도
문제 유형
접근 방식 및 풀이
문제 2: 문제 이름
문제 유형
접근 방식 및 풀이
문제 3: 문제 이름
문제 유형
접근 방식 및 풀이
문제 4: 문제 이름
문제 유형
접근 방식 및 풀이
문제 5: 문제 이름
문제 유형
접근 방식 및 풀이