mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 03:33:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			444 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			444 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>给定一个整数数组,找出总和最大的连续数列,并返回总和。</p>
 | 
						|
 | 
						|
<p><strong>示例:</strong></p>
 | 
						|
 | 
						|
<pre><strong>输入:</strong> [-2,1,-3,4,-1,2,1,-5,4]
 | 
						|
<strong>输出:</strong> 6
 | 
						|
<strong>解释:</strong> 连续子数组 [4,-1,2,1] 的和最大,为 6。
 | 
						|
</pre>
 | 
						|
 | 
						|
<p><strong>进阶:</strong></p>
 | 
						|
 | 
						|
<p>如果你已经实现复杂度为 O(<em>n</em>) 的解法,尝试使用更为精妙的分治法求解。</p>
 |