Longest Balanced Substring I – LeetCode 3713 Explained
Problem in plain terms You’re given a string s (lowercase English letters). A substring is balanced if every distinct character inside it appears the same number of times. Your task is to return the maximum length of any balanced substring. Example idea: “abba” is balanced because a appears 2 times and b appears 2 times. … Read more