Category Archives: Dynamic Programming

Find the Nth Fibonacci Number

Given a number N, the task is to find Nth Fibonacci number. The Fibonacci numbers are the numbers in the following integer series. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……. In this series, each number is the sum of the two preceding ones starting from 0 and 1. Examples: Input :… Read More »

Introduction to Dynamic Programming

Dynamic Programming is an algorithmic approach to solve some complex problems easily and save time and number of comparisons by storing the results of past computations. The basic idea of dynamic programming is to store the results of previous calculation and reuse it in future instead of recalculating them. Consider a simple example of calculating Factorials from 1… Read More »