Search
⌘K

Leetcode 948. Bag of Tokens

Given tokens and initial power, you can either spend power to gain score by playing small tokens face-up or spend score to gain power by playing large tokens face-down; maximize final score by optimally trading power and score. This is typically solved with a greedy two-pointer strategy on the sorted tokens to decide when to take a low-cost token for +1 score or sacrifice a point to replenish power.

Asked at:

Oracle


Question Timeline

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

Late August, 2025

Oracle

Senior

Comments

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