Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1962. Remove Stones to Minimize the Total
Given an array of pile sizes and k operations each removing floor(pile/2) stones from a chosen pile (possibly the same pile multiple times), minimize the final total by repeatedly applying the operation to the current largest pile — a greedy max-heap (priority queue) approach yields an efficient O((n+k) log n) solution for the given constraints.
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.