mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 11:21:42 +08:00
add leetcode problem-cn part6
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<p>Write a bash script to calculate the frequency of each word in a text file <code>words.txt</code>.</p>
|
||||
|
||||
|
||||
|
||||
<p>For simplicity sake, you may assume:</p>
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
<li><code>words.txt</code> contains only lowercase characters and space <code>' '</code> characters.</li>
|
||||
|
||||
<li>Each word must consist of lowercase characters only.</li>
|
||||
|
||||
<li>Words are separated by one or more whitespace characters.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<p><strong>Example:</strong></p>
|
||||
|
||||
|
||||
|
||||
<p>Assume that <code>words.txt</code> has the following content:</p>
|
||||
|
||||
|
||||
|
||||
<pre>
|
||||
|
||||
the day is sunny the the
|
||||
|
||||
the sunny is is
|
||||
|
Reference in New Issue
Block a user