← All problemsSign in

Substring

In a string, "run" is a substring with consisting of consecutive occurrences of the same character. For example, the string "mississippi" contains the following runs - "ss", "ss" and "pp". In this question, given a string, you have to output the length of the longest run in the string. Input A string, having length at most 100. The string is guaranteed to have at least one run. Output The len

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