Skip to content

[그리디알고리즘] 3월 27일#6

Open
song122333 wants to merge 2 commits intomainfrom
06-assignmnet
Open

[그리디알고리즘] 3월 27일#6
song122333 wants to merge 2 commits intomainfrom
06-assignmnet

Conversation

@song122333
Copy link
Collaborator

###인적사항
학번: 2391035
이름: 한송희

###과제제출
기존 제출: 19941,17451
추가 제출: 15662

Copy link

@zzangss zzangss left a comment

Choose a reason for hiding this comment

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

[15662번 코드리뷰 완료]

추가제출 확인하였습니다 :) 이번 주도 수고 많으셨어요!

Copy link

@s0ye0ve s0ye0ve left a comment

Choose a reason for hiding this comment

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

[17451 코드리뷰 완료]

17451번(p3)

송희님 안녕하세요!
그리디한 접근으로 깔끔하게 잘 풀어주셨네요~ ㅎㅎ 고생 많으셨습니다~!
짧은 코멘트 남겨드렸으니 확인해주세요 :)
질문이 있으시다면 언제든 편히 리뷰어를 호출해주세요! ☺️

Copy link

Choose a reason for hiding this comment

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

뒤에서부터 앞으로 접근하며 최적해를 구하는 방식으로 그리디하게 잘 접근해주셨네요! 🥰

Copy link

Choose a reason for hiding this comment

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

이 부분도 필요한 속도의 정수배가 되도록 잘 구현해주신 것 같습니다!

Copy link

Choose a reason for hiding this comment

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

p3. 코드의 재사용성을 높이기 위해 연산 로직을 함수화해보면 어떨까요? ☺️

Copy link

@s0ye0ve s0ye0ve left a comment

Choose a reason for hiding this comment

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

[19941 코드리뷰 완료]

19941(p2, p3)

19941번 그리디한 접근으로 잘 풀어주셨네요!
주석도 꼼꼼히 달아주셔서 코드리뷰하기 좋았습니다ㅎㅎ 🥰
몇 가지 리뷰 달아드렸으니 확인 후 머지해주세요! 수고 많으셨습니다~

Copy link

Choose a reason for hiding this comment

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

max, min으로 범위 바깥으로 나가지 않도록 체크하는 것 좋습니다!👍🏻

Copy link

Choose a reason for hiding this comment

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

p2. 현재 코드에서 인덴테이션이 4-depth로 깊어지는 문제가 있습니다.
코드의 가독성을 위해 최대 3-depth까지만 권장하며, if-else 구조 대신 continue나 return을 적절히 활용하는 것이 좋습니다! 😊
아래와 같이 continue를 활용해서 작성해주시면 불필요한 중첩을 줄일 수 있습니다 👍🏻

if (Table[i] != 'P') {
    continue;
}

Copy link

Choose a reason for hiding this comment

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

p3. 코드의 재사용성을 높이기 위해 연산 로직을 함수화해보면 어떨까요? ☺️

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