Array Of Products
Array Of Products
Write a function that takes in a non-empty array of integers and returns an array of the same length, where each element in the output array is equal to the product of every other number in the input array.
In other words, the value at output[i] is equal to the product of every number in the input array other than input[i].
Note that you're expected to solve this problem without using division.
Sample Input
Sample Output
Last updated