@atul: I got this now... very good one... the space is O(1) right, as what ever the the values we store in matrix, can be reverted back in similar way..
i haven't thought of the kadane's algo that comes within the inner loop, the O(n^4) solution i thought will search brutefocely in the inner loops, leading additional loop, also my new matrix construction goes along a different appraoch, where as yours is lot simple. Is the bruteforce solution for this O(n^6) ? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/F_WyacnfRp8J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
