Update fibonacci-solution.js by cats256 · Pull Request #370 · TheOdinProject/javascript-exercises · GitHub
Skip to content

Update fibonacci-solution.js#370

Merged
01zulfi merged 3 commits into
TheOdinProject:mainfrom
cats256:patch-2
Jul 7, 2023
Merged

Update fibonacci-solution.js#370
01zulfi merged 3 commits into
TheOdinProject:mainfrom
cats256:patch-2

Conversation

@cats256

@cats256 cats256 commented Jul 4, 2023

Copy link
Copy Markdown
Contributor

More optimized solution with O(1) memory usage

@CouchofTomato CouchofTomato requested a review from 01zulfi July 4, 2023 20:45

@01zulfi 01zulfi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like the proposed solution. IMO it's easier to understand. Just have one small nit below

Comment thread 10_fibonacci/solution/fibonacci-solution.js Outdated
Comment on lines +8 to +13

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just one more small change please. Can we go for current instead of curr and remove the comment? This exercise is fairly early in the curriculum and I want the variable names to be as clear as possible for the learners. Thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@CouchofTomato CouchofTomato requested a review from 01zulfi July 6, 2023 08:23

@01zulfi 01zulfi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 🚀

@01zulfi 01zulfi merged commit 15f1b82 into TheOdinProject:main Jul 7, 2023
Oussama5379 added a commit to Oussama5379/javascript-exercises that referenced this pull request Feb 1, 2025
painooo pushed a commit to painooo/javascript-exercises that referenced this pull request Dec 29, 2025
@cats256 cats256 deleted the patch-2 branch April 29, 2026 20:57
Paodpdro pushed a commit to Paodpdro/javascript-exercises that referenced this pull request May 19, 2026
FredTheJanitor pushed a commit to FredTheJanitor/javascript-exercises that referenced this pull request May 29, 2026
FredTheJanitor pushed a commit to FredTheJanitor/javascript-exercises that referenced this pull request May 29, 2026
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