Pergunta de entrevista da empresa Google

given an array, you need to compute a sum for each index 𝑖 while excluding the element at that index.