Leetcode 1446 - Consecutive chars

Note:

• Classic simulation problem.

Question:

The power of the string is the maximum length of a non-empty substring that contains only one unique character.

Given a string s, return the power of s.

Example:

Code: