Largest Sum of a Steep Subsequence

Asked at ServiceNow · Coding Questions · Difficulty: Hard

You are given a list of integers. Choose some of them, keeping their original order, so that the chosen values climb at least as fast as their positions: between any two neighbours in your choice, the value must go up by at least the number of positions you moved forward. Return the largest total you can get from such a choice.

Loading the problem…