Best Time to Buy and Sell Stock II
Given daily stock prices, return the maximum profit you can achieve with as many buy/sell transactions as you like (but you must sell before you buy again).
Given daily stock prices, return the maximum profit you can achieve with as many buy/sell transactions as you like (but you must sell before you buy again).