weidagang2046的專欄

          物格而后知致
          隨筆 - 8, 文章 - 409, 評論 - 101, 引用 - 0

          導航

          <2008年1月>
          303112345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          常用鏈接

          留言簿(12)

          隨筆檔案(8)

          文章分類(421)

          文章檔案(409)

          相冊

          Link

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          微軟筆試題max subsequence sum

          標  題: 微軟筆試題max subsequence sum
          發(fā)信站: 飲水思源 (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]

          [回復本文] 發(fā)信人: BSR(bsr), 信區(qū): Algorithm
          標  題: Re: 微軟筆試題max subsequence sum
          發(fā)信站: 飲水思源 (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 閱讀(958) 評論(1)  編輯  收藏 所屬分類: Others

          評論

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

          O(n)
          2008-01-20 10:37 | liu
          主站蜘蛛池模板: 乃东县| 砚山县| 钦州市| 雅江县| 万载县| 榆林市| 福安市| 宾阳县| 陇南市| 连山| 东乡| 宽甸| 元江| 白河县| 临潭县| 措勤县| 尉氏县| 横峰县| 民和| 宕昌县| 广丰县| 北京市| 格尔木市| 英超| 四川省| 绵竹市| 淄博市| 乌鲁木齐市| 惠东县| 潮州市| 黄山市| 十堰市| 石楼县| 黄石市| 大关县| 通河县| 缙云县| 正阳县| 台前县| 平舆县| 民县|