Take it or leave it
Values sit in a row and you may not take two that are next to each other. You want the largest total.
What are the two options at element i?
Values sit in a row and you may not take two that are next to each other. You want the largest total.
What are the two options at element i?