solulubeta
Sign in
DSA Basics / Exam level
03.16 · Problem

Repainting the Longest Stripe

Hard Sliding window with the most common letter Pro

This problem is part of solulu Pro

A long banner is painted in coloured blocks, one letter per colour. The painter may repaint at most k blocks, each to any colour he likes, and wants the longest continuous stripe of a single colour he can end up with.

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 81 of 90 · updated 2026-10-12