Explanation || Complexities || Simple Solution
IntuitionThe goal is to find the maximum consecutive sequence of identical characters in the string.
By identifying groups of consecutive characters, we can eff
# Intuition
The goal is to find the **maximum consecutive sequence** of identical characters in the string.  
By identifying groups of consecutive characters, we can efficiently track the maximum sequence length.

# Approach
1. **Initialization:**
   - Create a variable `maxLen` to store the maximum consecutive sequence length.
   - Use a pointer `i` to iterate through the string.

2. **Counting Consecutive Characters:**
   - For each starting character, assign it to `cur`.
   - Use a second pointer `j` to count the consecutive identical characters.
   - Once the consecutive sequence ends, update `maxLen` with the maximum length found so far.

3. **Advancing the Pointer:**
   - Move pointer `i` directly to `j` to skip over the counted sequence efficiently.

4. **Final Answer:**
   - Return `maxLen`, which holds the maximum sequence of identical characters.

# Complexity
- **Time Complexity:** $$O(n)$$ — Each character is processed exactly once.
- **Space Complexity:** $$O(1)$$ — Only integer variables are used for counting.


# Code
``` cpp []
class Solution {
public:
    int maxPower(string s) {
        int maxLen = 0;
        int n = s.size();

        for(int i = 0; i < n; ){
            char cur = s[i];
            int j = i, len = 0;

            while(j < n && s[j] == cur){
                len++;
                j++;
            }
            
            i = j;
            maxLen = max(maxLen, len);
        }

        return maxLen;
    }
};
```
```java []
class Solution {
    public int maxPower(String s) {
        int maxLen = 0;
        int n = s.length();

        for (int i = 0; i < n;) {
            char cur = s.charAt(i); // Current character
            int j = i, len = 0;

            // Count consecutive identical characters
            while (j < n && s.charAt(j) == cur) {
                len++;
                j++;
            }

            i = j; // Move 'i' to the next non-matching character
            maxLen = Math.max(maxLen, len);
        }

        return maxLen;
    }
}
```
``` python []
class Solution:
    def maxPower(self, s: str) -> int:
        maxLen = 0
        n = len(s)

        i = 0
        while i < n:
            cur = s[i]  # Current character
            j = i
            length = 0

            # Count consecutive identical characters
            while j < n and s[j] == cur:
                length += 1
                j += 1

            i = j  # Move 'i' to the next non-matching character
            maxLen = max(maxLen, length)

        return maxLen
```
['String', 'C++', 'Java', 'Python3']