Leetcode | 52. Maximum Subarray | Java | C#

Publicado em: 10 Outubro 2020
no canal de: CodeOnline
623
4

Leetcode | 52. Maximum Subarray | Java | C#


Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.

Follow up: If you have figured out the O(n) solution, try coding another solution using the divide and conquer approach, which is more subtle.



Example 1:

Input: nums = [-2,1,-3,4,-1,2,1,-5,4]
Output: 6
Explanation: [4,-1,2,1] has the largest sum = 6.


Nesta página do site você pode assistir ao vídeo on-line Leetcode | 52. Maximum Subarray | Java | C# duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário CodeOnline 10 Outubro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 623 vezes e gostou 4 espectadores. Boa visualização!