Consecutive Characters
Input: s = "leetcode"
Output: 2
Explanation: The substring "ee" is of length 2 with the character 'e' only.
Input: s = "abbcccddddeeeeedcba"
Output: 5
Explanation: The substring "eeeee" is of length 5 with the character 'e' only.
Input: s = "triplepillooooow"
Output: 5Solutions
π§ Cpp
Last updated