LeetCode 6348. Take Gifts From the Richest Pile
TLDR: Three alternative methods for LeetCode 6348. Best complexity is O(N).
The input is a collection of \(N\) numbers and iteration k. At each iteration, we need pick the largest number \(x\), put \(\sqrt{x}\) back to the collection, and take away ...
hash.hupili.net6 min read