Skip to content

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

Merged
shangan23 merged 4 commits into
AlgoDataStructure:mainfrom
sriramanvellingiri:nth-fib
Jun 22, 2021
Merged

shangan23 merged 4 commits into
AlgoDataStructure:mainfrom
sriramanvellingiri:nth-fib

Conversation

@sriramanvellingiri

Copy link
Copy Markdown
Collaborator

#1

@shangan23 shangan23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested

Comment thread recursion-nth-fibonacci.py Outdated
defaultArray = [0,1]
count = 3
while count <= n:
sumNo = defaultArray[0] + defaultArray[1]

Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Changed

Comment thread recursion-nth-fibonacci.py Outdated
defaultArray[0] = defaultArray[1]
defaultArray[1] = sumNo
count = count + 1
if n == 1:

Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

DOne

@shangan23 shangan23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

change required

Comment thread recursion-nth-fibonacci.py Outdated
@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