[algogeeks] Dynamic Programming - Series

2011-01-06 Thread Decipher
Given an array of integers, each element represents the max number of jumps can make forward. What is the minimum number of element selections to reach the end of the array (starting from the first element). Example: arr = 1, 3, 5, 8, 9, 2, 6, 7, 6, 8, 9 Here the min # of selections is : 3 with

[algogeeks] Dynamic Programming - Series

2011-01-05 Thread Decipher
We are given a checkerboard which has 4 rows and n columns, and has an integer written in each square. We are also given a set of 2n pebbles, and we want to place some or all of these on the checkerboard (each pebble can be placed on exactly one square) so as to maximize the sum of the integers in