Given an integer array nums, return an array output where output[i] is the product of all elements of nums except nums[i].
You must solve it in O(n) time without using the division operator.
Input: nums = [1, 2, 3, 4] Output: [24, 12, 8, 6] Explanation: output[0] = 2*3*4 = 24, output[1] = 1*3*4 = 12, output[2] = 1*2*4 = 8, output[3] = 1*2*3 = 6.
Input: nums = [-1, 1, 0, -3, 3] Output: [0, 0, 9, 0, 0] Explanation: Any position whose product includes the 0 at index 2 becomes 0; output[2] = (-1)×1×(-3)×3 = 9.
nums fits in a 32-bit integer.nums = [1, 2, 3, 4]