Skip to content

Máxima suma en un subarray #53

Description

@dpalmasan

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

Dado un array de enteros (nums), encontrar el subarray contiguo (que tenga al menos un número) que tenga la máxima suma y retornar dicha suma.

Ejemplo:

Input: nums = [-2,1,-3,4,-1,2,1,-5,4]
Output: 6
Explicación: [4,-1,2,1] tiene la máxima suma = 6.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions