Product Except Self

Medium Arrays & Hashing
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]. You must write an algorithm that runs in O(n) time and without using the division operation.
Hint
Use prefix and suffix product arrays to compute the products before and after each element.
Output
// Run your code to see the output here.