Friday, July 24, 2015

HackerRank::Algorithms::Greedy::Mark and Toys

   Just because we care only about the quantity of the items we need to start buying them from the cheapest one, the we should buy the second cheapest and so on until we either buy all of them or run out of money.


No comments:

Post a Comment