Here is my code, it was failing for two cases.
I have used two maximum possible sub-array of 1 and stored their range.
And calculated the maximum sub-array.
Here is my code, it was failing for two cases.
I have used two maximum possible sub-array of 1 and stored their range.
And calculated the maximum sub-array.