Search
⌘K

Leetcode 2706. Buy Two Chocolates

Find two distinct prices whose sum is <= money and as small as possible, then return the leftover money (money minus that minimal feasible sum); if no pair is affordable, return money.


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.