https://leetcode.com/problems/word-frequency/
# Read from the file words.txt and output the word frequency list to stdout.
awk '{for(i=1;i<=NF;i++){arr[$i]++}} END{for(w in arr){print w" "arr[w]}}' words.txt|sort -nrk 2https://leetcode.com/problems/word-frequency/
# Read from the file words.txt and output the word frequency list to stdout.
awk '{for(i=1;i<=NF;i++){arr[$i]++}} END{for(w in arr){print w" "arr[w]}}' words.txt|sort -nrk 2