Tap here to switch tabs
Problem
Submissions

Problem: Longest Balanced Substring I

Given a string, Longest Balanced Substring I asks you to return the maximum length of a substring where every distinct character appears exactly the same number of times.

Statement

Given a string s, determine the length of the longest balanced substring.

A substring is considered balanced if every distinct character present in it appears with the exact same frequency.

Constraints:

  • 1≤1 \leq s.length ≤1000\leq 1000

  • s consists of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Longest Balanced Substring I

Given a string, Longest Balanced Substring I asks you to return the maximum length of a substring where every distinct character appears exactly the same number of times.

Statement

Given a string s, determine the length of the longest balanced substring.

A substring is considered balanced if every distinct character present in it appears with the exact same frequency.

Constraints:

  • 1≤1 \leq s.length ≤1000\leq 1000

  • s consists of lowercase English letters.