Skip to content

[GREEDY] Kadane's Algorithm #10

@TiElixir

Description

@TiElixir

Kadane's Algorithm

Description

Kadane's Algorithm is used to determine a non-empty subarray which has the maximum possible sum of its elements.

Category - Greedy

Implementation

Languages: Python, C++

Approach

Iterating through the array while calculating the currentSum, setting it to 0 if it becomes negative and updating the maxSum accordingly.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions