You are viewing a single comment's thread. Return to all comments →
def maximumToys(prices, k): # Write your code here prices.sort() current=0 toys=0 for toy in prices: if toy+current<=k: current+=toy toys+=1 return toys
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 →