摘要: 问题1: 问题2: 问题3: 这次是可以交易任意次,但是每次卖出的时候都要收取一定费用,所以不能用贪心了,因为贪心只能考虑相邻的两个是否交易,但是这次可能出现前边的留着不卖而后边卖,要用常规的动态规划,但是状态法方程和动态变量都有两个 直接上代码 未完待续... 阅读全文
posted @ 2017-08-16 17:56 stAr_1 阅读(280) 评论(0) 推荐(0) 编辑
摘要: Given a triangle, find the minimum path sum from top to bottom.Each step you may move to adjacent numbers on the row below.For example, given the following triangle[[2],[3,4],[6,5,7],[4,1,8,3]]The min... 阅读全文
posted @ 2017-08-16 15:19 stAr_1 阅读(224) 评论(0) 推荐(0) 编辑