Search
⌘K

Leetcode 2335. Minimum Amount of Time to Fill Cups

Given three nonnegative cup counts and the rule that each second you may fill either two cups of different types or one cup of any type, compute the minimum seconds to finish; the core challenge is optimally pairing different types (greedy pairing of the largest counts) to maximize two-cup moves and minimize time.


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.