Skip to content

We have WAY too many implementations of max subarray sum #8812

Closed
@tianyizheng02

Description

@tianyizheng02

Feature description

Correct me if I'm wrong, but I believe all of these files are near-identical implementations of Kadane's algorithm for max subarray sum:

Furthermore, I think both of these files are basically the same divide-and-conquer algorithm for the problem:

and I think both of them also implement Kadane's algorithm as helper functions.

Why do we have so many duplicate implementations of the same algorithm? We should either just have one max subarray sum file that implements both Kadane's algorithm and the divide-and-conquer algorithm, or have one file implementing Kadane's algorithm and another file implementing the divide-and-conquer algorithm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis PR modified some existing files

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions