Pergunta de entrevista da empresa ACCELQ

Given an array find the index where sum of left Subarray is equal to sum of right subarray

Resposta da entrevista

Sigiloso

20 de mai. de 2025

1. calculate prefix sum -> so that you can get left subarray sum for any index 2. calculate total sum of the array 3. For the right subarray sum -> go through the every index and calcuate the rightSum as totalSum - prefixSum of the index if right sum equals leftsum then return the index