Given an integer array `nums`, return an array `answer` such that `answer[i]` is equal to the product of all the elements of `nums` except `nums[i]`. The algorithm must run in O(n) time and without using the division operation.
Prefix and Suffix Products
For any index `i`, the product of all elements except `nums[i]` is (product of elements before `i`) * (product of elements after `i`). We can precalculate these 'prefix' and 'suffix' products in O(n) time. To save space, we can store the prefix products in the result array and then multiply by suffix products in a second pass.