You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
dynamic_programming/max_sum_contiguous_subsequence.py
maths/kadanes.py
maths/largest_subarray_sum.py
other/maximum_subarray.py
(this one allows non-contiguous subsequences)other/maximum_subsequence.py
Furthermore, I think both of these files are basically the same divide-and-conquer algorithm for the problem:
dynamic_programming/max_sub_array.py
divide_and_conquer/max_subarray_sum.py
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.
The text was updated successfully, but these errors were encountered: