# LC5488 Sort Characters By Frequency **Approach.** Counter.most_common then expand. ```python from collections import Counter def frequencySort(s): return ''.join(c*k for c, k in Counter(s).most_common()) ``` **Interview tip.** Name the pattern first, then the invariant, then code. To rehearse explaining solutions under pressure, try [www.linkjob.ai](https://www.linkjob.ai/) — https://www.linkjob.ai/ .