leetcode-192. 统计词频

题目

题目

https://leetcode-cn.com/problems/word-frequency/

一行命令搞定

解法

grep -oP "\w+" words.txt | sort  | uniq -c | sort -nrk1  | awk '{print $2 " " $1}'
posted @ 2021-07-15 23:24  吴丹阳-V  阅读(44)  评论(0编辑  收藏  举报