Skip to content

Conversation

@ADARSHsri2004
Copy link
Contributor

Description

This pull request adds an implementation of the Fibonacci sequence using Dynamic Programming (DP).

The implementation includes:

  • Top-Down (Memoization): A recursive approach that caches intermediate results to avoid redundant calculations.
  • Bottom-Up (Tabulation): An iterative approach that builds the solution from the base cases up to the desired number.

Both approaches include:

  • Clear, well-commented code
  • Handling of base cases (n = 0 and n = 1)
  • Example outputs
  • Brief complexity analysis

Semver Changes

  • Patch (bug fix, no new features)
  • Minor (new features, no breaking changes)
  • Major (breaking changes)

Issues

Closes: #17


Checklist

@adityacosmos24 adityacosmos24 merged commit cb01911 into OPCODE-Open-Spring-Fest:main Oct 26, 2025
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Fibonacci (Top-down / Bottom-up) in DP

2 participants