xwero posted a programming challenge not to long ago that was a bit of fun for everyone involved - I thought I would post another one here. I’ll post my solution tomorrow.
Given a list (A) with n elements, generate a list (B) with n elements such that the ith element of B is equal to the product of all elements in A except for the ith element.
Test sets:
A = [1, 2, 3]
f(A) = [6, 3, 2]
A = [4, 5, 6]
f(A) = [30, 24, 20]
A = [32, 0, -6]
f(A) = [0, -192, 0]