股票买卖3是不是错了# JobHunting - 待字闺中g*y2012-11-07 08:111 楼Leetcode上面的。[3,3,5,0,0,3,1,4] 8 6 对于上面这个例子,最大的profit应该是8,为什么expected是6?
a*o2012-11-07 08:112 楼不能买俩。。。只能先买一个,再卖一个【在 g****y 的大作中提到】: Leetcode上面的。: [3,3,5,0,0,3,1,4] 8 6 : 对于上面这个例子,最大的profit应该是8,为什么expected是6?
x*y2012-11-07 08:114 楼[3,3,5,0,0,3,1,4]Isn't "buy 3 and sell 5; buy 0 and sell 3; buy 1 and sell 4" getting 8?【在 a***o 的大作中提到】: 不能买俩。。。只能先买一个,再卖一个
c*t2012-11-07 08:115 楼没记错的话,那道题好像只允许买卖两次。【在 x***y 的大作中提到】: [3,3,5,0,0,3,1,4]: Isn't "buy 3 and sell 5; buy 0 and sell 3; buy 1 and sell 4" getting 8?