Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2813. Maximum Elegance of a K-Length Subsequence
Select exactly k items (each with profit and category) to maximize total_profit + (number_of_distinct_categories)^2, requiring a trade-off between picking highest-profit items (even if same category) and increasing category diversity for a quadratic bonus. The core challenge is combinatorial selection that balances sum maximization with a nonlinear reward for distinct categories.
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.