Tap here to switch tabs
Problem
Submissions

Problem: Maximum Length Substring With Two Occurrences

med
30 min
Try to solve the Maximum Length Substring With Two Occurrences problem.

Statement

Given a string s, return the maximum length of a substring such that every character occurs at most 22 times within it.

Constraints:

  • 2≤2 \leq s.length ≤100\leq 100

  • s consists only of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Length Substring With Two Occurrences

med
30 min
Try to solve the Maximum Length Substring With Two Occurrences problem.

Statement

Given a string s, return the maximum length of a substring such that every character occurs at most 22 times within it.

Constraints:

  • 2≤2 \leq s.length ≤100\leq 100

  • s consists only of lowercase English letters.