Solve B. Comparison String from Codeforces using a simple greedy trick.
In this video, we explain why the answer is:
π Longest consecutive same character + 1
Includes clear intuition, dry run, and clean C++ implementation.
Perfect for beginners in competitive programming π