5
-5 -2 5 7 -1
with this input it works.
with this input it says there was problem in running the code.
5
5 -2 5 7 -1
help me with this.
sometimes it works ,sometimes keeps saying there is problem in running the code.why is that?
5
-5 -2 5 7 -1
with this input it works.
with this input it says there was problem in running the code.
5
5 -2 5 7 -1
help me with this.
sometimes it works ,sometimes keeps saying there is problem in running the code.why is that?
@Kriti_Anand
The only issue is with the time complexity. It is O(n*n) as of now. Try reducing it to O(n) using Kadanes Algo.