Skip to content

tech(recursion/nth-fibonacci): fibonacci #2

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 4 commits into from
Jun 22, 2021

Conversation

sriramanvellingiri
Copy link
Collaborator

#1

Copy link
Contributor

@shangan23 shangan23 left a comment

Choose a reason for hiding this comment

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

Changes requested

defaultArray = [0,1]
count = 3
while count <= n:
sumNo = defaultArray[0] + defaultArray[1]
Copy link
Contributor

Choose a reason for hiding this comment

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

change sumNo variable to sum

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed

defaultArray[0] = defaultArray[1]
defaultArray[1] = sumNo
count = count + 1
if n == 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

move this if-block before count init since there is no need for count assignment and further while check. correct me if I am wrong

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

DOne

Copy link
Contributor

@shangan23 shangan23 left a comment

Choose a reason for hiding this comment

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

change required

@shangan23 shangan23 merged commit 9aeb68c into AlgoDataStructure:main Jun 22, 2021
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