Could you explain what happens in this line of code exactly?

product[i] = product[i] * right

Type your question above this line.



Here we are multiplying product with the most right value in the array. In each iteration there will be a decrement with the right index which is specified in the loop. At initial point product is [1, 0, 0, 0], after each iteration the calculated product of the array values will be stored in it.

1 Like

thank you for your explanation