Frequency Sorting

Frequency Sorting

对给定的序列进行排序,以便对其元素进行分组,并按照元素在序列中出现的次数,即频率递减的顺序进行分组。如果两个元素的出现频率相同,那么它们的分组应该按照元素的自然顺序排列。例如

example

如果您想在类似的情况下进行更多的练习,请尝试Sort Array by Element Frequency mission。

You should be an authorized user in order to see the full description and start solving this mission.