1833. Maximum Ice Cream Bars
On This Page
class Solution:
def maxIceCream(self, costs: List[int], coins: int) -> int:
costs.sort()
for i, c in enumerate(costs):
if coins < c:
return i
coins -= c
return len(costs)