Maximum Sum of Subsequence With Non-adjacent Elements
Track the best non-adjacent sum with each value skipped or taken, and re-solve after every point update.
Track the best non-adjacent sum with each value skipped or taken, and re-solve after every point update.