@aritra90tnp The idea is simple. We can divide the each slot of result array to two parts:
result[i] means the product of all elements with index less than
result[i] means the product of all elements with index larger than
We use two loops to calculate
right. Then we store the result in the
result array in the meanwhile.