3692. Majority Frequency Characters
You are given a string
sconsisting of lowercase English letters.The frequency group for a value
kis the set of characters that appear exactlyktimes in s.The majority frequency group is the frequency group that contains the largest number of distinct characters.
Return a string containing all characters in the majority frequency group, in any order. If two or more frequency groups tie for that largest size, pick the group whose frequency
kis larger.
1 | class Solution { |