Available question text
Given per-tower upper bounds, assign each tower a unique positive integer height not exceeding its maximum to maximize the total sum (return -1 if impossible). The core challenge is choosing distinct values under individual caps — typically solved by sorting the maxima and greedily assigning the largest feasible distinct heights in decreasing order.
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 3301. Maximize the Total Height of Unique Towers
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source