For each index, multiply all other elements.
Each product computation takes . With positions, that's total.
For , that's operations. Too slow.
The trap
For each index, multiply all other elements.
Each product computation takes . With positions, that's total.
For , that's operations. Too slow.