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

[ysle0] Week2 #742

Merged
merged 7 commits into from
Dec 22, 2024
Merged

[ysle0] Week2 #742

merged 7 commits into from
Dec 22, 2024

Conversation

ysle0
Copy link
Contributor

@ysle0 ysle0 commented Dec 18, 2024

답안 제출 문제

체크 리스트

  • 우측 메뉴에서 PR을 Projects에 추가해주세요.
  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@ysle0 ysle0 requested a review from taewanseoul December 18, 2024 15:02
@ysle0 ysle0 self-assigned this Dec 18, 2024
@ysle0 ysle0 requested a review from a team as a code owner December 18, 2024 15:02
@github-actions github-actions bot added the go label Dec 18, 2024
@HC-kang
Copy link
Contributor

HC-kang commented Dec 18, 2024

@ysle0 님 안녕하세요!
주차 설정에 체크해주셨는데 실제 설정에는 빠져있네요!

Copy link
Contributor

@taewanseoul taewanseoul left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~ go를 덕분에 처음 리뷰 했습니다 ㅎㅎㅎ

Comment on lines 11 to 13
if !ok {
return false
}
Copy link
Contributor

Choose a reason for hiding this comment

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

밑에서 포문으로 한번 걸러주는 로직 덕분에 이 조건문은 없어도 되는 것 같습니다~

Copy link
Contributor

@obzva obzva Dec 21, 2024

Choose a reason for hiding this comment

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

@taewanseoul
극단적인 경우엔 해당 조건문이 상당한 양의 연산을 줄일 수 있습니다

// 예
s = "a...a" // (길이 5 * 10^4)
t = "b...b" // (길이 5 * 10^4)

Copy link
Contributor

Choose a reason for hiding this comment

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

@ysle0
isAnagram 함수의 body 가장 앞단에 아래와 같은 로직도 있으면 좋을 것 같네요 :)

func isAnagram(s string, t string) bool {
    if len(s) != len(t) {
        return false
    }
    ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아 그렇겠네요 경계검사 조건 피드백 감사합니다!

ret = append(ret, ret[i-1]+ret[i-2])
}

ret = ret[len(ret)-2:]
Copy link
Contributor

Choose a reason for hiding this comment

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

javascript의 slice 메소드가 이렇게 다르게 생겼군요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

네.. 저도 처음에 이렇게 slicing 하는 것 보고 되게 신기했었어요 ㅎㅎ

@taewanseoul
Copy link
Contributor

아직 solving 상태로 되어 있으셨군요...! 제가 모르고 리뷰 했습니다. 죄송합니다!

@ysle0 ysle0 merged commit 626038c into DaleStudy:main Dec 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

4 participants