Skip to content

format code #1363

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

Merged
merged 1 commit into from
Jul 30, 2020
Merged

format code #1363

merged 1 commit into from
Jul 30, 2020

Conversation

realDuYuanChao
Copy link
Member

No description provided.

@realDuYuanChao
Copy link
Member Author

@yanglbme please review. thanks

@realDuYuanChao realDuYuanChao requested a review from yanglbme July 11, 2020 02:44
@@ -5,16 +5,13 @@
class TowerOfHanoi {
public static void shift(int n, String startPole, String intermediatePole, String endPole) {
// if n becomes zero the program returns thus ending the loop.
if (n == 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Why are you removing the base case?

Copy link
Member Author

Choose a reason for hiding this comment

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

recursion function will be terminated when if (n != 0 ) failed

@realDuYuanChao realDuYuanChao merged commit 2890797 into TheAlgorithms:master Jul 30, 2020
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.

2 participants