Maximum subarray sum question doubt

i tried to dry run code and i am unable to find where is mistake