b***k 发帖数: 2673 | 1 ☆─────────────────────────────────────☆
idontknow (不要问我到哪里去) 于 (Mon Oct 8 23:12:09 2007) 提到:
You are given an array of integer of size N (A[0],A[1],A[2],...A,[N-1])
containing both negative and non-negative integers. Design an efficient
algorithm to find the sub sequence A[i],A[i+1],A[i+2]...,A[j] having the
maximum summation (A[i]+A[i+1]+A[i+2] + ...+A[j] have the highest sum). What
is the complexity of your algorithm?
---
大家讨论一下。
☆─────────────────────────────────────☆
robustzgy (浪迹天涯 |
|