Maximum circular sum..i am not able to build logic...coudl you explain me whats the logic behind it

question: maximum circular sum

Hey @aarijrab
Please follow this: Please provide hint