timelimit (5.97 sec) is coming when i am running code
what should i do?
Maximum subarray sum
@shubhirajput21 Your current code has a complexity of O(n^2) due to which you are getting Time Limit Exceed. You have to do this in O(n) using the Kadane’s Algorithm. There is already a lecture video on this algorithm. You can refer that if you are not familiar with it.
Hope this helps 
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.