The Most Common Word
words.txt has one word per line. Print the word that appears most often: the word alone, without its count.
Example 1
words.txt
tea milk tea egg tea milk
prints
tea
Constraints
- 3 to 35 lines
- One word appears more often than every other
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Bash problems
- Busiest VisitorsHard
- Lines of CodeHard
- Only in the FirstHard
- Share of ErrorsHard
- Shift Them UpHard
- Sort Into FoldersHard
- TODOs per FileHard
- The Biggest FileHard