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.
Your account is free and you can post anonymously if you choose.