← 返回 citadel 的题目列表Best Time to Buy and Sell Stock with Multiple Transactions
类型:online_judge
You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times). However, you may not engage in multiple transactions simultaneously (you must sell the stock before you buy again). Return the maximum profit you can achieve.
Example
Input
[7,1,5,3,6,4]
Output
7