-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Rewrite fibonacci.py #5665
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
Comments
@tianyizheng02 Yeah I agree. So you want a simple straightforward solution of the Fibonacci series with DP right? |
No, the original file just had comparisons of different methods of calculating the Fibonacci sequence (iterative and Binet's formula), so those methods just need to be rewritten and cleaned up |
@tianyizheng02 Can I work on this ? |
Kindly assign this task to me. |
poyea
pushed a commit
that referenced
this issue
Oct 31, 2021
* Removed doctest call * Removed 0 and 1 append to `fib_array` * Moved fibonacci sequence logic into `calculate` * Refactored `get` to generate missing numbers * Renamed `fib_array` to `sequence` * Renamed `number` to `index` * Refactored `get` to only return sequence to `index` * Moved main block into function * Added documentation to `get` * Added missing type hints * Fixed doctest error in `get` docstring * Moved calculate logic into get * Reformatted with black * Fixed wrong generation range
This was referenced Oct 31, 2021
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a lot of bloat in this file that needs to be cleaned up (empty and unused classes, unnecessary helper functions, inefficient code, etc.)
The text was updated successfully, but these errors were encountered: