best time to buy and sell stock II - create the solution