Finding the maximum weight subsequence of an array of positive integers?
- by BeeBand
I'm tring to find the maximum weight subsequence of an array of positive integers - the catch is that no adjacent members are allowed in the final subsequence.
The exact same question was asked here, and a recursive solution was given by MarkusQ.
He provides an explanation, but can anyone help me understand how he has expanded the function? How does this solution take into consideration non-adjacent members?