1、Description
2.How to Solve
根据dynamic programming的思路,要想找到max profit,先找到当前买进价格对应的max profit,然后随着时间推移买进价格的变化,对应的max profit只有在买进价格变低的时候才会增大(假设同一天卖出)。
1、Description
2.How to Solve
根据dynamic programming的思路,要想找到max profit,先找到当前买进价格对应的max profit,然后随着时间推移买进价格的变化,对应的max profit只有在买进价格变低的时候才会增大(假设同一天卖出)。