Search
⌘K
Leetcode 3442. Maximum Difference Between Even and Odd Frequency I
Given a lowercase string, compute character frequencies and return the maximum possible difference freq(a1) - freq(a2) where a1 has an odd frequency and a2 has an even frequency. The input length is ≤100 and is guaranteed to contain at least one odd-frequency and one even-frequency character.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.