2014-04-28 23:52

题目:设计算法,找出一本书中某个单词的出现频率。

解法:数就行了。

代码:

 1 // 17.9 Given a book, find out the occurrences of any given words in it.
 2 // Answer:
 3 //    1. process the book as a text file.
 4 //    2. find all words, definition of a word must be clearly asserted.
 5 //    3. use map or hash table to record the occurrences of words.
 6 //    4. query the statistics for an answer.
 7 int main()
 8 {
 9     return 0;
10 }

 

相关文章:

  • 2022-01-29
  • 2021-10-25
  • 2021-10-30
  • 2021-11-28
  • 2022-02-18
  • 2021-11-14
  • 2021-09-21
  • 2021-07-27
猜你喜欢
  • 2022-01-24
  • 2021-11-04
  • 2021-08-12
  • 2021-09-19
  • 2021-12-30
  • 2021-06-25
  • 2021-10-03
相关资源
相似解决方案