Search
⌘K

Leetcode 2819. Minimum Relative Loss After Buying Chocolates

Given a sequence of chocolate prices, determine the smallest possible relative loss (loss as a fraction of the buy price) you can guarantee by optimally timing purchases under the problem's constraints. This requires comparing price ratios across pairs and is typically approached with techniques like binary search on the answer combined with greedy/graph or DP checks to handle precision and large inputs.


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.