The input to a function is an array of n elements.Output of that function is also an array where each element is product of all elements in the input array except the one with same index. Input ::::: 1 2 3 4 Output ::::: 2*3*4 1*3*4 1*2*4 1*2*3
Sigiloso
Either run two loops nested and carry out operations ==> O(n^2) or multiply every element at first, which is O(n) and then divide each element by the product to find individual answers ==> O(n) Total time complexity => O(2n) ==> O(n)