Cannot under stand the approch

THE CALCULATE THE SUM ARRAY QUESTION - I CANNOT UNDERSTAND HOW TO MAKE A CIRCULAR ARRAY AND ALSO THE LOGIC BEHIND THE INDEX ALSO

hi @anmol14657927_fea11050bb9f621a,
refer https://ide.codingblocks.com/s/662778