Introduction This short article is mainly for students, software engineers and those who are struggling to get a grip on the subject. In other words I will not be focusing on the theoretical side of the topic. I will first explain what Dynamic Programming means then provide several examples to demonstrate this algorithmic technique. I
Problem Given an array of N integers. The array is expected to contain positive as well as negative numbers. Find the maximum contiguous subsequence sum (MCSS) of the array. For example the MCSS of {2, -4, 1, 2} is 3 which is the sum of the subsequence {1, 2}. A brute force approach requires 3
Fibonacci numbers problem Write a program to compute the Fibonacci sequence number of a given integer. Your algorithm must run in linear time ie O(N). What is the fibonacci sequence Definition: Fibonacci number of (N) is the sum of Fibonacci numbers of (N-1) and (N-2). In other words, the fibonacci numbers list formula: where Fibonacci