i have copied code from geeks for geeks and made suitable changes how can my code show run time error
here is link please correct and solve
How can my code show run time error
We use Kadane’s Algorithm to efficiently solve maximum subarray sum problem in O(n) time complexity.
I suggest you to first understand the algorithm and then try to write the code yourself instead of directly copying from geeksforgeeks.
Try this and tell me if you are able to do so. Otherwise I will provide you with the code.
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.