Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2530. Maximal Score After Applying K Operations
Given an array nums and integer k, repeatedly pick an element to add to your score then replace it with ceil(val/3); maximize the total after exactly k picks. The optimal strategy is greedy—always take the current maximum (can be implemented efficiently with a max-heap) to simulate k operations.
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.