46. Detect Alternating Pattern

Loading...

Loading...

Input

6 6 1 0 1 0 1 0

Expected Output

1