Skip to content

Vermouth1995/MaxSubseqSum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

MaxSubseqSum

Description:
给定(可能有负数)整数序列A1, A2, A3..., An,求这个序列中子序列和的最大值。(如果所有整数均为负数,则最大子序列和为0)。例如:输入整数序列:-2, 11, 8, -4, -1, 16, 5, 0,则输出答案为 35,即从 A2~A6 的和。