The Wayback Machine - https://web.archive.org/web/20201103185301/https://github.com/TheAlgorithms/Java/pull/964
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

simplified program #964

Open
wants to merge 3 commits into
base: master
from
Open

simplified program #964

wants to merge 3 commits into from

Conversation

@yatin9988
Copy link

@yatin9988 yatin9988 commented Oct 4, 2019

removed uneccessary conditions.

@Spikatrix
Copy link
Contributor

@Spikatrix Spikatrix commented Oct 6, 2019

Your code is flawed as it returns the function will return true for n <= 1

yatin9988 added 2 commits Oct 6, 2019
Copy link
Contributor

@Spikatrix Spikatrix left a comment

Looks to be correct now, but the previous code is more efficient and well structured.

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.