You are viewing a single comment's thread. Return to all comments →
def maximumToys(prices, k): # Write your code here prices.sort() count=0 priceSum=0 for i in prices: if (i<=k and priceSum+i<=k): priceSum+=i count+=1 return count
Seems like cookies are disabled on this browser, please enable them to open this website
Mark and Toys
You are viewing a single comment's thread. Return to all comments →