Search
⌘K

Leetcode 3445. Maximum Difference Between Even and Odd Frequency II

Find the maximum value of freq[a] - freq[b] over all substrings of length ≥ k of a string (digits '0'–'4'), subject to character a having an odd frequency in the substring and character b having a nonzero even frequency; the small fixed alphabet and parity constraints are the central challenge for efficient search.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.