Tap here to switch tabs
Problem
Submissions

Problem: Maximum Number of Equal Length Runs

Try to solve the Maximum Number of Equal Length Runs problem.

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

Try to solve the Maximum Number of Equal Length Runs problem.

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.