Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3208. Alternating Groups II
Given a circular binary array and integer k, count how many contiguous length-k segments are alternating (every adjacent pair within the segment differs). Because of the circular wrap, this reduces to checking windows where all k-1 internal adjacent pairs are different (a sliding-window over adjacency flags).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.