About Me

Sunday, August 26, 2012

Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array.

Example 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7).

2 comments:

  1. http://swagatech.blogspot.com/2012/08/max-sum-of-non-adjacent-numbers-in-array.html

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete

Hi thanks , we will get back to you shortly !!!