You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Given a string s, sort it in decreasing order based on the frequency of the characters. The frequency of a character is the number of times it appears in the string.
14
+
sidebar_position: 0451
15
+
---
16
+
17
+
## Problem Description
18
+
19
+
Given a string s, sort it in decreasing order based on the frequency of the characters. The frequency of a character is the number of times it appears in the string.
20
+
21
+
Return the sorted string. If there are multiple answers, return any of them.
22
+
23
+
Note that s may contain leading or trailing spaces or multiple spaces between two words. The returned string should only have a single space separating the words.
0 commit comments