注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
Imagine you're building a search engine. In the language of your choosing, build an application that, given an English language document as input, builds a data structure capturing the count of each word in the document.
Bonus:
Create an inverted index as well: a mapping of the words to absolute positions in the document.
As context, this is a foundational algorithm for search systems and information retrieval. Be sure to consider accuracy, complexity, and intent in the design of your program. |