Find product of array elements : <p>Today, in the job interview i was asked a question:
we have an array</p>

<pre><code>[3,1,2,4]
</code></pre>

<p>write the function thatfind composition of elements not including one element during itearion and return new array,it's mean that</p>

<pre><code>for 3 composition will be : 1*2*4 = 8

for 1 : 3*2*4=24

for 2 : 3*1*4 = 12

for 4: 3*1*2 = 6
</code></pre>

<p>So answer will be <code>8,24,12,6</code>
It's pretty easy but i have 2 constraint</p>

<p>1) You can't use operator "/"</p>

<p>2) Your algorithm must be <code>O(n)</code></p>

<p>That i didn't write an answer. How this task should be done?</p>
