Product of Array
Anonimo
You can go over the array twice: 1. The first time you can calculate the product of all the cells --> save it in a variable productAll 2. Then with a for loop - for every i in range(len(array)): NewArray[i] = productAll/array[i] Then the complexity is of course: O(n).