摘要:
找出最长递增序列 O(NlogN)(不一定连续!)参考 http://www.felix021.com/blog/read.php?1587%E5%8F%AF%E6%98%AF%E8%BF%9E%E6%95%B0%E7%BB%84%E9%83%BD%E6%B2%A1%E7%BB%99%E5%87%B... 阅读全文
摘要:
参考http://www.ahathinking.com/archives/120.htmlvar arr = [2, 8,-2, 3, 5, -3, 2];//传统方法 O(n^2)function fun1(arr){ var maxSum =arr[0]; var maxSumArr = ... 阅读全文