We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93d0927 commit 1529be2Copy full SHA for 1529be2
192.word-frequency.sh
@@ -0,0 +1,8 @@
1
+# https://leetcode.cn/problems/word-frequency/
2
+# Date: 2023.08.04
3
+# Pass/Error/Bug: 1/2/0
4
+# 执行用时: 0 ms, 击败 100.00% 使用 Bash 的用户
5
+# 内存消耗:3.54 MB, 击败 69.43% 使用 Bash 的用户
6
+
7
+# Read from the file words.txt and output the word frequency list to stdout.
8
+sed 's/ \+/\n/g' words.txt | grep -v '^$' | sort | uniq -c | sort -k1nr | awk '{print $2, $1}'
0 commit comments