Tap here to switch tabs
Problem
Submissions

Problem: Maximum Difference Between Even and Odd Frequency I

Try to solve the Maximum Difference Between Even and Odd Frequency I problem.

Statement

Given a string s consisting of lowercase English letters, determine the maximum difference between the frequency of a character that appears an odd number of times and the frequency of a character that appears an even number of times.

Specifically, calculate the maximum value of (extfrequencyofcharactera)−(extfrequencyofcharacterb)( ext{frequency of character } a) - ( ext{frequency of character } b), where character aa has an odd frequency and character bb has an even frequency in s.

Constraints:

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

  • s consists only of lowercase English letters.

  • s contains at least one character with an odd frequency and at least one character with an even frequency.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Difference Between Even and Odd Frequency I

Try to solve the Maximum Difference Between Even and Odd Frequency I problem.

Statement

Given a string s consisting of lowercase English letters, determine the maximum difference between the frequency of a character that appears an odd number of times and the frequency of a character that appears an even number of times.

Specifically, calculate the maximum value of (extfrequencyofcharactera)−(extfrequencyofcharacterb)( ext{frequency of character } a) - ( ext{frequency of character } b), where character aa has an odd frequency and character bb has an even frequency in s.

Constraints:

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

  • s consists only of lowercase English letters.

  • s contains at least one character with an odd frequency and at least one character with an even frequency.