But kadane gave a O(n3) solution for it too. In this algorithm we calculate the prefix sum for all possible row combination in O(n2) and then take out their maximum contigous sum in O(n) time. Thus doing the task in O(n3) time.
Read full article from Maximum Subarray in 1-D and 2-D Array | COME ON CODE ON
No comments:
Post a Comment