← All problemsSign in

Repeated String

A string is considered to be k-repeated if there is some character that exist in every substring of length k. For example,"abcacba" is 3-repeated because 'a' is present in every substring of length 3. Given a string s of lowercase English letters, find the minimum possible value of k such that the given string is k repeated. **Note**: A substring of a string is a contiguous section of the strin

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start