-
Notifications
You must be signed in to change notification settings - Fork 0
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
[그리디] 9월 27일 #5
base: main
Are you sure you want to change the base?
The head ref may contain hidden characters: "06_\uADF8\uB9AC\uB514"
[그리디] 9월 27일 #5
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.
[그리디 알고리즘 코드 리뷰 완료]
1213(P3), 17451(P3)
안녕하세요 은솜님! 코드 리뷰 및 추가제출 확인 완료되었습니다👍
주석 처리도 좋고, 문제도 깔끔하게 잘 풀어주셨어요!
몇 가지 사소한 코멘트 남겼습니다.
궁금하신 점이 있다면 리뷰어를 호출해주세요!
alpha[idx]++; | ||
} | ||
|
||
int isOne = 0; //홀수개 알파벳 개수 담을 변수 |
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.
P3
알튜비튜에서는 변수명에는 스네이크 표기법을 사용하고 있어요! is_one과 같은 이름은 어떨까요?
{ | ||
for (int i = 0; i < alpha.size(); i++) { | ||
for (int r = 0; r < alpha[i] / 2; r++) { | ||
sb += (char)(i + 'A'); |
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.
P3
char 없이도 문자형으로 잘 들어갑니다!
if (isOne > 1) { | ||
answer += "I'm Sorry Hansoo"; | ||
} |
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.
팰린드롬을 만들 수 없는 조건을 잘 발견해주셨네요!👍
for (int i = n - 2; i >= 0; i--) { | ||
if (velocity < planet[i]) { //필요한 속도보다 작은 경우 | ||
velocity = planet[i]; | ||
} | ||
//배수 아니면, 양의 배수로 만들면서 앞으로 진행! | ||
else if (planet[i] < velocity && velocity % planet[i] != 0) { | ||
velocity = ((velocity / planet[i]) + 1) * planet[i]; | ||
} | ||
} |
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.
최소 속도를 만드는 조건을 파악해서 문제를 잘 풀어주셨네요!👍
###인적 사항
학번 : 2271018
이름 : 김은솜
<\br>
###과제 제출
기존 제출 : 17451, 1213
추가 제출 : 18111
<\br>