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.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.