yshshrm / Data-Structures-And-Algorithms-Hacktoberfest18

List of data structures and algorithms. Feel free to contribute under Hacktoberfest '18!
204 stars 1.1k forks source link

Kadane's Algorithm #1693

Open Kam149 opened 3 years ago

Kam149 commented 3 years ago

Kadane's algorithm is used to find the maximum sum of a contiguous subarray. Array can consists of both positive and negative elements. Kadane's algorithm is based on the idea of looking for all positive contiguous subarray and find the maximum sum of a contiguous subarray.

Kam149 commented 3 years ago

A new algorithm in c# has been added known as Kadane's Algorithm.