归档 2016年11月2日

[LeetCode]Sort Characters By Frequency

题目描述:

LeetCode 451. Sort Characters By Frequency

Given a string, sort it in decreasing order based on the frequency of characters.

Example 1:

Input:
"tree"

Output:
"eert"

Explanation:
'e' appears twice while 'r' and 't' both appear once.
So 'e' ...

继续阅读

昨天

明天

归档