I cant understand the loop where sir print the largest subarray

i cant understand the part where sir print the largest subarray with its sum… I mean how the loop is working…
why we take it as -1.