basic idea is scanning from both side of the array,and multiply the factors. no tricky at all.

```
int* productExceptSelf(int* nums, int numsSize, int* returnSize) {
if(0==numsSize) return 0;
int *ret=malloc(numsSize*sizeof(int));
*returnSize=numsSize;
int i=0;
while(i<numsSize){
ret[i]=1;
++i;
}
i=1;
int right=1;
int left=1;
while(i<numsSize){
left*=nums[i-1];
ret[i]*=left;
right*=nums[numsSize-i];
ret[numsSize-i-1]*=right;
++i;
}
return ret;
}
```