Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
2k views

Javascript Fibonacci with dynamic programming

Trying to applying what seen on What Is Dynamic Programming and How To Use It (here: https://www.youtube.com/watch?v=vYquumk4nWw ) Obviuously this is the final code, after removing the recursion. I ...
TheQult's user avatar
  • 268
6 votes
3 answers
2k views

Performance of dynamic Fibonacci generator and dead rabbits

I would like to improve my code style and its efficiency. I'm just moving beyond the standard recursive approach to a lot of simple algorithms. This post has two code snippets with slightly ...
julianstanley's user avatar
8 votes
6 answers
2k views

Yet another Fibonacci number generator

First attempt at dynamic programming. I want to make this run faster and better. fibonacci.cpp ...
anna328p's user avatar
  • 318
12 votes
2 answers
647 views

Dynamic Programming: Fibonacci-like recurrence relation

This is a problem from my Introduction to Algorithms textbook. Consider the infinite sequence of numbers An|n>0 = (1,1,3,4,8,11,...) defined recursively as follows. $$ A_n = \left\{\begin{aligned} &...
Legato's user avatar
  • 9,929
12 votes
5 answers
7k views

Dynamic programming with Fibonacci

I have written the following code using a dynamic programming technique. Can I use ArrayList here? Please let me know if I can improve this code. ...
VIckyb's user avatar
  • 675