Pergunta de entrevista da empresa Amazon

Multiply of each element in array beside the current element