Documentation for 0fea073413

This commit is contained in:
github-actions
2022-10-25 21:38:38 +00:00
parent 179526ce7a
commit 54cd9079ad
1772 changed files with 5550 additions and 5247 deletions

View File

@@ -138,7 +138,7 @@ Functions</h2></td></tr>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Implementation of <a href="https://en.wikipedia.org/wiki/Kadane%27s_algorithm" target="_blank">Kadane Algorithm</a> </p>
<p >Kadane algorithm is used to find the maximum sum subarray in an array and maximum sum subarray problem is the task of finding a contiguous subarray with the largest sum</p>
<h3><a class="anchor" id="autotoc_md70"></a>
<h3><a class="anchor" id="autotoc_md71"></a>
Algorithm</h3>
<p >The simple idea of the algorithm is to search for all positive contiguous segments of the array and keep track of maximum sum contiguous segment among all positive segments(curr_sum is used for this) Each time we get a positive sum we compare it with max_sum and update max_sum if it is greater than curr_sum</p>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/ayush523" target="_blank">Ayush Singh</a> </dd></dl>