Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3301. Maximize the Total Height of Unique Towers
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.