Available question text
Choose a subsequence maximizing sum under the constraint nums[i_j] - nums[i_{j-1}] >= i_j - i_{j-1], which is equivalent to requiring the transformed values v[i] = nums[i] - i be nondecreasing along the subsequence. The problem reduces to finding the maximum-sum nondecreasing subsequence of v (n up to 1e5), solvable by DP with range-maximum queries (e.g., Fenwick/segment tree) in O(n log n).
Related questions
Continue with questions that share topics or the same question type.
- Maximum Alternating Subsequence Sum
Coding
- Maximum Sum of Subsequence With Non-adjacent Elements
Coding
- Binary Tree Maximum Path Sum
Coding · Binary Tree · Depth-First Search · DP on Trees
- Choose K Elements With Maximum Sum
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2926. Maximum Balanced Subsequence Sum
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source