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

[Assignments 1] - 우이산 #9

Closed
wants to merge 2 commits into from

Conversation

goldentrash
Copy link

(1주차 과제를 풀어두고 제출하지 않았었네요. 다음부터는 바로바로 제출하도록 하겠습니다.)

  • Fibonacci
  • Collatz Sequence
  • Nested Arrays

@utilForever utilForever self-requested a review May 19, 2024 14:42
Copy link
Owner

@utilForever utilForever left a comment

Choose a reason for hiding this comment

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

수고하셨습니다. 과제를 해결하실 때 개선했으면 하는 부분이 있습니다.
피드백을 남겨뒀으니 확인 부탁드립니다.

Comment on lines +4 to +7
while n != 1 {
n = if n % 2 == 0 { n / 2 } else { 3 * n + 1 };
length += 1;
}
Copy link
Owner

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;
Copy link
Owner

Choose a reason for hiding this comment

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

return을 생략할 수 있습니다.

Suggested change
return length;
length

}
}

return transposed;
Copy link
Owner

Choose a reason for hiding this comment

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

return을 생략할 수 있습니다.

Suggested change
return transposed;
transposed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants