451. Sort Characters By Frequency (Medium) 按照字符出现次数对字符串排序(leetcode排序)

题目:
Input: "tree" Output: "eert" Explanation: 'e' appears twice while 'r' and 't' both appear once. So 'e' must appear before both 'r' and 't'. Therefore "eetr" is also a valid answer.

posted on 2020-05-18 14:09  Hebye  阅读(186)  评论(0编辑  收藏  举报

导航