Leetcode - product of array except self
Every time you feel obliged to put a comment like

    // Start filling up left array


you really deal with a potentially important algorithm, which deserves a name, and a method of its own. In this case the algorithm is known as partial product. Consider factoring it out, and see the comments disappear.

Ditto for the second loop.

Regarding space complexity,


You don't need left: accumulate the partial products directly into output.
You don't need right as well: instead of accumulating the partial products, use it immediately:

    temp = 1;

    for (int i = size - 1; i &gt;= 0; i--) {
        output[i] *= temp;
        temp = temp * nums[i];
    }