NeetCode #148LC-451MediumArrays & Hashing
← Back to All Problems

#148 · #451 · Sort Characters By Frequency(根据字符出现频率排序)

📌 Problem Statement & Constraints

Given a string s, sort it in decreasing order of character frequency. Constraints: 1 <= s.length <= 5 * 10^5; s consists of ASCII characters.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!