Problem 2495 · Medium

Number of Subarrays Having Even Product

Scan left to right; the subarrays ending here with an even product start at or before the last even value.

Open the interactive visualisation