Leetcode | 52. Maximum Subarray | Java | C#

Publicado el: 10 octubre 2020
en el 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.


En esta página del sitio puede ver el video en línea Leetcode | 52. Maximum Subarray | Java | C# de Duración hora minuto segunda en buena calidad , que subió el usuario CodeOnline 10 octubre 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 623 veces y le gustó 4 a los espectadores. Disfruta viendo!