Leetcode 3684. Maximize Sum of At Most K Distinct Elements | Hello Interview