← back to unit
Medium
# breaking it down medium
The Sticker Spree
The sticker shop, a fistful of coins, and one goal: the MOST stickers, not the fanciest. 🌈
You get your budget and the sticker prices. Print the maximum number of stickers you can buy.
Example:
Input: budget = 10, prices = [3, 5, 2, 8]
Output: 3
Buying cheapest-first — 2, then 3, then 5 — spends 2 + 3 + 5 = 10 exactly, getting 3 stickers before running out of money.
💡 need a hint?
brk-sticker-spree.py🔒 given lines are locked — write your code in between
loading...