Closed xiongjunliang closed 10 years ago
蒙拿,你这题的code大数据超时呀,O(N^2)的算法复杂度要超时的。 需要O(N)的算法才能过的。 https://github.com/xiongjunliang/leetcode/blob/master/stock3/stock3.cpp
是的,还有几个题目也是大数据没有过,等我搞完托福抽时间搞一下。
Hi xiongjunliang,
I have fixed the time out bug of Best Time to Buy and Sell Stock III. Thank you for your information!
Meng
Good Job!
蒙拿,你这题的code大数据超时呀,O(N^2)的算法复杂度要超时的。 需要O(N)的算法才能过的。 https://github.com/xiongjunliang/leetcode/blob/master/stock3/stock3.cpp