Tap here to switch tabs
Problem
Submissions

Problem: Majority Frequency Characters

Try to solve the Majority Frequency Characters problem.

Statement

Given a string s, determine the frequency of each unique character.

Group the distinct characters by their frequencies, where the size of each group is the number of distinct characters sharing that frequency.

Identify the group with the maximum size. If there is a tie between multiple frequency groups of the same maximum size, choose the group corresponding to the largest frequency.

Return a string containing all distinct characters in this chosen frequency group. The characters may be returned in any order.

Constraints:

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

  • s consists only of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Majority Frequency Characters

Try to solve the Majority Frequency Characters problem.

Statement

Given a string s, determine the frequency of each unique character.

Group the distinct characters by their frequencies, where the size of each group is the number of distinct characters sharing that frequency.

Identify the group with the maximum size. If there is a tie between multiple frequency groups of the same maximum size, choose the group corresponding to the largest frequency.

Return a string containing all distinct characters in this chosen frequency group. The characters may be returned in any order.

Constraints:

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

  • s consists only of lowercase English letters.