Problem can be found in here!
Solution: Sorting + Greedy
def maxIceCream(costs: List[int], coins: int) -> int:
index = 0
costs.sort()
while coins >= 0 and index < len(costs):
if costs[index] <= coins:
coins -= costs[index]
index += 1
else:
break
return index