NPTEL Introduction to Programming in C Assignment 6 Question 2
In a string, a "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.
A string, having length at most 100. The string is guaranteed to have at least one run.
The length of the longest run in the string.
abbaaacccc
4
pqrsssspppqqppttttt
5
pprdfgeerjimcndddgeejkcjjdjsssssrrtthsa
5
ppqqqyrtgfdreeennnnnnssggrrjfhg
6