-
Notifications
You must be signed in to change notification settings - Fork 126
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
[Vidam, Invidam] Week5 Solutions In Go #109
Conversation
if sum == 0 { | ||
triplets = append(triplets, []int{nums[i], nums[j], nums[k]}) | ||
} | ||
j, k = update(i, j, k, sum, nums) |
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.
go 문법 재미있네요! 혹시 이렇게 update 함수를 따로 만들어서 풀이하신 특별한 이유가 있을까요?
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.
재미있으셨다니 감사합니다 ㅎㅎ..
사실 제가 이전에 C++로 작성한 코드를 슬쩍봤었는데 가시성이 너무 떨어지는 것 같아 분리했었어요
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.
수고하셨어용!
``` | ||
|
||
# 여담 | ||
- 타 솔루션들을 보며 정렬을 하지 않고 빈도수별로 원소들을 모아놨다가 배열을 만드는 방법도 확인했다. 직관적이진 않다고 느꼈다. |
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.
공감합니다 :)
var max int | ||
|
||
for _, num := range nums { | ||
ret := longestConsecutiveFrom(num, appear, cache) |
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.
재귀로 푸시는 분은 많이 못 봤는데 신선하군요!
``` | ||
- - - | ||
# Intuition | ||
솔루션에서 네트워크 통신을 위한다는 목적을 듣고 수정해보았다. (유니코드를 넣는 게 의도는 아닌 듯했다.) |
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.
의도를 잘 파악하셨네요 👏
5주차 솔루션 올립니다!
솔루션들과는 사뭇 다른 풀이들(
encode-and-decode-strings
,product-of-array-except-self
)이 있어 신기했습니다