>_
product_except_self.go
Go 1.26
Not run yet

+ 7 hidden

Input
nums = [3, 1, 4, 2]
Expected
[8, 24, 6, 12]

answer[0] is 1 · 4 · 2 = 8, and answer[1] skips the 1, so it is the full product 3 · 4 · 2 = 24.