Skip to content

fix(curriculum): allow memoized recursion in Nth Fibonacci Number Calculator lab - #71460

Merged
majestic-owl448 merged 1 commit into
freeCodeCamp:mainfrom
Aryan9891:fix/nth-fibonacci-recursion-71458
Oct 30, 2026
Merged

majestic-owl448 merged 1 commit into
freeCodeCamp:mainfrom
Aryan9891:fix/nth-fibonacci-recursion-71458

Conversation

@Aryan9891

@Aryan9891 Aryan9891 commented Oct 30, 2026 •

Copy link
Copy Markdown

Checklist:

Closes #71458

In the Build an Nth Fibonacci Number Calculator lab (curriculum/challenges/english/blocks/lab-nth-fibonacci-number/68de7360e1832ea180577a8a.md), user story 4 requires:

Calling fibonacci(n) should use a dynamic programming approach to compute and return the n-th number from the Fibonacci sequence, where each number is the sum of the two preceding numbers.

Dynamic programming includes both memoized top-down recursion and iterative bottom-up tabulation. The lab's final hint and AST check:

assert not _Node(_code).find_function("fibonacci").find_body().block_has_call("fibonacci")

prohibited recursion, incorrectly rejecting valid memoized recursive solutions that satisfy all user stories.

This PR removes the recursion prohibition hint and check from the lab while keeping all existing functional tests, list initialization checks, and return-value requirements intact as requested in #71458.

…culator lab (freeCodeCamp#71458)

Signed-off-by: Aryan Sachin <aryansachinixd@gmail.com>
@github-actions github-actions Bot added scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. deprioritized PR reviews are deprioritized; lacks productive input and ignores codebase best practices. labels Oct 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there,

Thanks for opening this pull request.

The automated checks found some issues:

Checklist: The PR description is missing the required checklist or some of its items are not completed:

  1. The Checklist: heading is present in the PR description.
  2. The checkbox items are ticked (changed from [ ] to [x]).
  3. You have actually completed the items in the checklist.

Please edit your PR description to include the following template with the checklist items completed.

Checklist:

<!-- Please follow this checklist and put an x in each of the boxes, like this: [x]. It will ensure that our team takes your pull request seriously. -->

- [ ] I have read and followed the [contribution guidelines](https://contribute.freecodecamp.org).
- [ ] I have read and followed the [how to open a pull request guide](https://contribute.freecodecamp.org/how-to-open-a-pull-request/).
- [ ] My pull request targets the `main` branch of freeCodeCamp.
- [ ] I have tested these changes either locally on my machine, or GitHub Codespaces.

<!--If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.-->

Closes #XXXXX

<!-- Feel free to add any additional description of changes below this line -->

Join us in our chat room or our forum if you have any questions or need help with contributing.

@github-actions github-actions Bot removed the deprioritized PR reviews are deprioritized; lacks productive input and ignores codebase best practices. label Oct 30, 2026

@majestic-owl448 majestic-owl448 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.

Thank you for your contribution to the page! 👍
We are happy to accept these changes and look forward to future contributions. 🎉

@majestic-owl448
majestic-owl448 merged commit cf563f4 into freeCodeCamp:main Oct 30, 2026
19 of 20 checks passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nth Fibonacci Number Calculator lab rejects valid memoized recursion

2 participants