Tap here to switch tabs
Problem
Submissions

Problem: Maximum Number of Equal Length Runs

Maximum Number of Equal Length Runs gives you a string divided into maximal groups of identical letters. Return the largest count of groups that share the same length.

Statement

You are given a string s consisting of lowercase English letters.

A run is defined as a maximal contiguous substring of identical characters.

Return the maximum number of runs in s that have the same length.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists of lowercase English letters only.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Number of Equal Length Runs

Maximum Number of Equal Length Runs gives you a string divided into maximal groups of identical letters. Return the largest count of groups that share the same length.

Statement

You are given a string s consisting of lowercase English letters.

A run is defined as a maximal contiguous substring of identical characters.

Return the maximum number of runs in s that have the same length.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists of lowercase English letters only.