pyassistant

Product of Array Except Self

You are given a list of integers. Your task is to return a new list where each element at index i is the product of all the numbers in the original list except the one at i. Do not use division in your solution.

Example:

Input:
[1, 2, 3, 4]
Output:
[24, 12, 8, 6]

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.