Given an integer array nums, return an array answer such that answer[i] equals the product of all elements of nums except nums[i]. You cannot use the division operator.
With nums = [1, 2, 3, 4], the answer is [24, 12, 8, 6]. For index 0, the product is 2 × 3 × 4 = 24. For index 1, it's 1 × 3 × 4 = 12. And so on.
Without division, how can you compute each product without recalculating from scratch?
Constraints: , values from to .