Help me to resolve the TLE issue

all my test cases is passed moreover the hand written test cases are also passed , how to optimize can you please tell

Hey @1999atrijsharma
apply Kadane’s Algorithm:

Initialize:
max_so_far = 0
max_ending_here = 0

Loop for each element of the array
(a) max_ending_here = max_ending_here + a[i]
(b) if(max_so_far < max_ending_here)
max_so_far = max_ending_here
(c ) if(max_ending_here < 0)
max_ending_here = 0
return max_so_far