weidagang2046的專欄

          物格而后知致
          隨筆 - 8, 文章 - 409, 評論 - 101, 引用 - 0
          數據加載中……

          微軟筆試題max subsequence sum

          標  題: 微軟筆試題max subsequence sum
          發信站: 飲水思源 (2005年11月07日11:05:23 星期一)

          You are given an array of numbers which could be positive and negative. Please
          write down a function to return the max subsequence sum from it.
          Note: The sequence could start from any number within the array.
          Sample: Array: -1, 7, -2, 5, -3
          The max subsequence sum should be 10, by the subsequence 7, -2, 5.
          大家討論一下,有哪些時間復雜度最低的算法。
          --

          ※ 來源:·飲水思源 bbs.sjtu.edu.cn·[FROM: 219.228.107.45]

          [回復本文] 發信人: BSR(bsr), 信區: Algorithm
          標  題: Re: 微軟筆試題max subsequence sum
          發信站: 飲水思源 (2005年11月07日12:27:18 星期一), 轉信
          
          job 前天討論過了 
          o(n) 即可 
          
          
          【 在 oceanist (oceanist) 的大作中提到: 】
          : You are given an array of numbers which could be positive and negative. Please
          :  write down a function to return the max subsequence sum from it.
          : Note: The sequence could start from any number within the array.
          : Sample: Array: -1, 7, -2, 5, -3
          : The max subsequence sum should be 10, by the subsequence 7, -2, 5.
          : 大家討論一下,有哪些時間復雜度最低的算法。
          

          posted on 2005-11-08 22:11 weidagang2046 閱讀(948) 評論(1)  編輯  收藏 所屬分類: Others

          評論

          # re: 微軟筆試題max subsequence sum[未登錄]  回復  更多評論   

          O(n)
          2008-01-20 10:37 | liu
          主站蜘蛛池模板: 涟源市| 永泰县| 娄烦县| 平阴县| 德惠市| 江津市| 肃北| 阜南县| 古丈县| 合水县| 博客| 永和县| 吉林省| 突泉县| 禹州市| 湘潭市| 鹿邑县| 鲁山县| 武义县| 文安县| 康乐县| 吴川市| 江山市| 永德县| 平原县| 渭源县| 沭阳县| 长寿区| 松原市| 柘城县| 额敏县| 神木县| 永靖县| 无极县| 罗定市| 乌拉特后旗| 海口市| 大关县| 吴旗县| 调兵山市| 高邮市|