Compute the product of every element except the current one while correctly handling zeros.
Constraints
Example
```python # Example 1 product_except_self([1, 2, 3, 4]) # Output: [24, 12, 8, 6] # Example 2 product_except_self([0, 1, 2]) # Output: [2, 0, 0] # Example 3 product_except_self([0, 0]) # Output: [0, 0] # Example 4 product_except_self([]) # Output: [] ```
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints