Skip to content

Conversation

@kimeunsom
Copy link
Collaborator

@kimeunsom kimeunsom commented Sep 20, 2023

인적사항

학번 : 2271018
이름 : 김은솜

과제제출

기존 제출 : 2607, 14235
추가 제출 : 2075

Copy link

@kimhj010502 kimhj010502 left a comment

Choose a reason for hiding this comment

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

[우선순위 큐 알고리즘 문제 코드 리뷰 완료]

14235(P3), 2075(P3)

은솜님 안녕하세요!
과제하시느라 수고 많으셨습니다!! 어려운 문제인데도 잘 풀어주셨네요! 🥰
코드에 대한 주석도 너무 좋았습니다 👍
몇 가지 사소한 코멘트 드렸습니다.
궁금한 점이 있으면 리뷰어를 호출해주세요!

+) Pull Request에 2주차 코드도 포함되어있네요 과제 제출 방법을 다시 한 번 확인해주세요!

Choose a reason for hiding this comment

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

priority_queue는 처음 선언할 때 default로 최대 힙으로 선언되기 때문에 그냥 priority_queue<int> pq;로 작성해줘도 돼요!

Choose a reason for hiding this comment

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

이렇게 작성하면 반복문을 돌 때마다 gift 변수가 새로 정의되니 반복문 밖에서 한번만 정의해주는 게 더 좋을 것 같네요~!

Choose a reason for hiding this comment

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

P3. 문제 조건에 맞게 잘 구현해주셨네요!

Copy link

@sawoll sawoll left a comment

Choose a reason for hiding this comment

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

2607(P3)

안녕하세요 은솜님! 5주차 필수 구현문제 코드리뷰 완료했습니다. 조건을 코드로 표현하는 데에 고민이 필요한 문제였는데 잘 풀어주셨습니다🙌 적절한 주석도 보기 좋았습니다. 간단한 코멘트 달아드렸으니 읽어보시고 궁금한 점이 생기면 리뷰어를 호출해주세요! 수고 많으셨습니다.😍

Comment on lines +26 to +77
Copy link

Choose a reason for hiding this comment

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

아주 고민해서 문제를 풀어주신 흔적이 보입니다. 꼼꼼하게 경우를 나줘 주셨어요! 다만, sameAlp 변수를 이용해 개수에 차이가 있는 알파벳의 개수를 세고, 그 다음 구체적인 개수를 고려해 주셨는데 작성해주신 코드에선 불필요하게 한 번 더 두 배열의 원소를 처음부터 끝까지 비교하는 부분이 포함됩니다. 처음부터 각 알파벳의 개수의 차의 총합을 구하고, 그를 바탕으로 비슷한 단어인지를 판별한다면 더 간결하고 쉬운 코드가 될 것 같습니다.😊

Copy link

Choose a reason for hiding this comment

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

이렇게 형변환을 해주지 않아도 word[i]는 자동으로 정수형으로 들어갑니다!

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.

4 participants