#238 - Product of Array Except Self
Given an integer array nums, return an array answer where answer[i] equals the product of all elements of nums except nums[i]. You must solve it without using division and in O(n) time. The output array does not count as extra space.
| Input | Output |
|---|---|
nums = [1,2,3,4] | [24,12,8,6] |
nums = [-1,1,0,-3,3] | [0,0,9,0,0] |