removing from mask

taking problem buying products with different prices over days, have to buy each product once and trying to get min price

  • for each day, with some remaining , either choose to skip or buy an item based on min of previous calls
  • for buying an item, eval for all that are in the current subset of items
  • for not buying an item, eval
  • then, take buying an item, not buying an item

elevator subsets

have some people with some weights , all need to go on elevator with max weight of while minimizing # of rides

  • number of rides as , amount of weight in current ride as , trying to minimize then
  • observation: only last rider matters, so start with
  • if adding the rider weight to the current weight is less than , make , comparing with last since trying all values in a loop
  • else, if adding exceeds , make , since making a new ride with in it.

planes

directional graph of cities (flights), need to start at city and end at city while going through all cities

  • define to be finding routes ending at using cities in
  • base case is
  • += for all that point to city in
  • then, evaluate for solution