Maximum Profit Along Forward Jumps

Asked at Google · Coding Questions · Difficulty: Medium

You walk along an array of `n` positions numbered `0` to `n - 1`, starting at position `0`. Position `i` carries a pair `(jump_length, profit)`.

Loading the problem…