Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3245. Alternating Groups III
Maintain counts of contiguous alternating-color segments in a circular binary array while supporting point color updates and queries that ask how many length-k alternating groups exist. The challenge is to handle wraparound and update counts efficiently (up to ~5e4 operations) by tracking maximal alternating runs and their contributions to fixed-length subsegments.
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.