logo
Interview
    Interview Guide
    Coding Problems List
Sponsored: Coursera
Problems

Product of Array Exclude Itself

Problem

Given an integers array A.

Define B[i] = A[0] * ... * A[i-1] * A[i+1] * ... * A[n-1], calculate B WITHOUT divide operation.

Example

For A = [1, 2, 3], return [6, 3, 2].

Online Judge