This is Product of Array Except Self from LeetCode. Given an array , return an array where is the product of all elements except . The twist: you can't use division, and you must solve it in time.
Without division, you can't just compute the total product and divide. What do you do? Read the problem statement carefully, noting the constraints. Try to identify the recursive structure before looking at the solution.