You are given a circular array of binary integers colors. An alternating group is defined as a contiguous subarray of
Because colors is circular, the first and last elements are considered adjacent.
Return the total number of alternating groups of size
Constraints:
colors.length
colors[i]
You are given a circular array of binary integers colors. An alternating group is defined as a contiguous subarray of
Because colors is circular, the first and last elements are considered adjacent.
Return the total number of alternating groups of size
Constraints:
colors.length
colors[i]