Finding products of all other members of an array
This could be done with two consecutive loops (instead of nested loops), making it O(N) instead of O(N^2).

In the first loop you calculate the total product of all non-zero elements (and the number of zeros).

If there are more than one zero, return result as is, since all elements already default to zero.

In the second you either set the result element to zero or to total product divided by the current element depending on the number of zeros in the data and the value of the current element.

BTW, There are a lot of blog posts and even some research written about the pointlessness of this kind of interview questions.