Domanda di colloquio di Virtusa

Write the code for Subarray and it's sum and explain it