Pregunta de entrevista de Virtusa

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