Leetcode 1518. Water Bottles
Given initial full bottles and a conversion rate of empty bottles to one full, compute the maximum number of bottles you can drink by repeatedly drinking and exchanging empties for new full bottles. This is a simple simulation/greedy loop using division and remainder until you no longer have enough empties to exchange.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.