Skip to content

Commit 98f80df

Browse files
Update 0454-4Sum-II
1 parent 602be30 commit 98f80df

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,25 @@
11

2+
---
3+
id: sort-characters-by-frequency
4+
title: Sort Characters By Frequency (LeetCode)
5+
sidebar_label: 0451-Sort Characters By Frequency
6+
tags:
7+
- Hash Table
8+
- String
9+
- Sorting
10+
- Heap(Priority Queue)
11+
- Bucket Sort
12+
- Counting
13+
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.
24+
25+
## Assign

0 commit comments

Comments
 (0)