<p>↵
Hello everyone,↵
</p>↵
<p>↵
I am trying to improve the time complexity of the following simple problem.↵
</p>↵
<p>↵
<b>$Problem:</b>$ Given an array $A$ consisting of N$N$ positive integers. For each K$K$ where $(1 <= K <=\le K \le N)$ find the largest sum sub array of size K$K$. You just need to output the largest sum for each size K$K$.↵
</p>↵
<pre>↵
Sample Input:↵
4↵
1 3 2 1↵
↵
Sample Output:↵
3 5 6 7↵
</pre>↵
<p>↵
Any solution or idea better than O(N^2) is welcome. Any help will be appreciated.↵
</p>
Hello everyone,↵
</p>↵
<p>↵
I am trying to improve the time complexity of the following simple problem.↵
</p>↵
<p>↵
</p>↵
<pre>↵
Sample Input:↵
4↵
1 3 2 1↵
↵
Sample Output:↵
3 5 6 7↵
</pre>↵
<p>↵
Any solution or idea better than O(N^2) is welcome. Any help will be appreciated.↵
</p>