Confused between kadane algo and the normal way to find sum

when i calculated the max sum in note book and in with your first technique the answer is differ than kadane’s algo

hello @karnawatsanyam
no answer should be shame in both the approaches.

try to do ti again

i did implemented the code

pls share ur code using cb ide,i will check

got it sir there was a minor error in the first code i forget to put = in third loop , thanks anyway :wink: