dp of size n with all elements set to 0.dp[n - 1] to questions[n - 1][0] (points of the last question).n - 2 down to 0.
i, calculate the points if we solve it: solve = questions[i][0] + (dp[i + questions[i][1] + 1] if i + questions[i][1] + 1 < n else 0).skip = dp[i + 1].dp[i] with the maximum of solve and skip.dp[0] as the result, which represents the maximum points that can be earned from all questions.