Search
⌘K

Leetcode 1561. Maximum Number of Coins You Can Get

Given 3n piles, you repeatedly pick any three piles where Alice takes the largest, you take the second-largest, and Bob takes the smallest; compute the maximum total coins you can obtain after n rounds. The core challenge is to choose groupings that maximize the sum of the n second-largest elements (this reduces to a greedy/sorting strategy).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.