Available question text
Given an array of spell damages, pick a subset to maximize total damage under the rule that choosing any value v forbids using values v-2, v-1, v+1, and v+2. Reduce by aggregating total damage per distinct value and solve with dynamic programming over the sorted values to handle the ±2 exclusion.
Related questions
Continue with questions that share topics or the same question type.
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 3186. Maximum Total Damage With Spell Casting
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source