Skip to content
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

[ 스택, 큐, 덱 ] 8월 30일 #2

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

sari-harin
Copy link
Collaborator

인적사항

학번: 2071079
이름: 이하린

###과제제출
기존 제출: 10757, 4949, 1158
추가 제출:

Copy link
Member

@Goldchae Goldchae left a comment

Choose a reason for hiding this comment

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

p2. 로직은 좋습니다! 한번 함수형 프로그래밍으로 기능들을 분리해 보세요! 수고하셨습니다!


using namespace std;

int main(){
Copy link
Member

Choose a reason for hiding this comment

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

p2. main함수에서는 입출력만 넣어주시는 편이 좋습니다! 기능을 분리하여 함수로 만들어보세요!

Comment on lines +13 to +33
for(int i=1;i<=n;i++){
q.push(i);
}

cout << "<";

while(!q.empty()){
for(int i=1;i<k;i++){
q.push(q.front());
q.pop();
}
if(q.size()!=1){
cout << q.front() << ", ";
q.pop();
}
else{
cout << q.front() << ">";
q.pop();
}
}

Copy link
Member

Choose a reason for hiding this comment

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

로직 깔끔하고 좋은 것 같습니다!


using namespace std;

int main(){
Copy link
Member

Choose a reason for hiding this comment

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

p2. 마찬가지로 함수 분리해주시면 좋을 것 같네요!

cout << "yes" << '\n';
}
}

Copy link
Member

Choose a reason for hiding this comment

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

마찬가지로 로직 깔끔하고 좋습니다!

Copy link

@chae-jpg chae-jpg left a comment

Choose a reason for hiding this comment

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

[스택, 큐, 덱 구현 코드 리뷰 완료]

10757(P3)

안녕하세요 하린님! 코드 리뷰 완료되었습니다👍
깔끔하게 문제를 잘 풀어주셔서 특별히 드릴 말씀은 크게 없었습니다!
다음부터는 간단한 주석을 달아주시면 더 좋을 것 같아요👍
궁금한 점이 있으시다면 리뷰어를 호출해주세요~

Comment on lines +25 to +43
while (a_size>0||b_size>0){
if(a_size>0){
a_digit=a[--a_size]-'0';
}
else{
a_digit=0;
}
if(b_size>0){
b_digit=b[--b_size]-'0';
}
else{
b_digit=0;
}
a_b=a_digit+b_digit+ab_over;
ab_over=a_b/10;
a_b%=10;
ab_char=a_b+'0';
ab_total+=ab_char;
}
Copy link

Choose a reason for hiding this comment

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

덧셈의 원리를 이용해서 덧셈을 잘 구현해주셨네요!👍

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.

3 participants