您的位置:首页 > 其它

《Cracking the Coding Interview》——第17章:普通题——题目9

2014-04-28 23:53 330 查看
2014-04-28 23:52

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

解法:数就行了。

代码:

// 17.9 Given a book, find out the occurrences of any given words in it.
// Answer:
//    1. process the book as a text file.
//    2. find all words, definition of a word must be clearly asserted.
//    3. use map or hash table to record the occurrences of words.
//    4. query the statistics for an answer.
int main()
{
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐