Question d’entretien chez Virtusa

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