Search
⌘K

Leetcode 2140. Solving Questions With Brainpower

Given a sequence of questions you must consider in order, each question i either yields points[i] but forces you to skip the next brainpower[i] questions or can be skipped; maximize total points. This is an interval-scheduling/DP problem solvable with DP or memoized recursion in O(n) time for n up to 1e5.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.