โ† All coding problems

Product of array except self

MediumArrays

Return an array where position i holds the product of every number in nums except nums[i]. Try to do it without division.

Function
function solve(nums)
Example 1
nums = [1,2,3,4]
โ†’ [24,12,8,6]

Submit also runs 3 hidden tests, including edge cases.

console.log output is shown below