Cloze

Prefix and suffix productsMedium

Product of Array Except Self

For each position, give the product of every other number in nums, without dividing.

Aim for O(n) time, O(1) extra spaceInspired by a classic interview problem ↗