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
[Assignments 1] - 우이산 #9
Conversation
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.
수고하셨습니다. 과제를 해결하실 때 개선했으면 하는 부분이 있습니다.
피드백을 남겨뒀으니 확인 부탁드립니다.
while n != 1 { | ||
n = if n % 2 == 0 { n / 2 } else { 3 * n + 1 }; | ||
length += 1; | ||
} |
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.
n이 0인 경우면, 무한 루프가 돌지 않을까요?
length += 1; | ||
} | ||
|
||
return length; |
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.
return
을 생략할 수 있습니다.
return length; | |
length |
} | ||
} | ||
|
||
return transposed; |
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.
return
을 생략할 수 있습니다.
return transposed; | |
transposed |
(1주차 과제를 풀어두고 제출하지 않았었네요. 다음부터는 바로바로 제출하도록 하겠습니다.)