开发者

Data structure used for search suggestions

开发者 https://www.devze.com 2023-03-12 02:08 出处:网络
What is the data structure used for search suggestions like Google Suggest开发者_如何学Python. Does it all depend on the application? Would be helpful someone give me a link to good reference!Consider

What is the data structure used for search suggestions like Google Suggest开发者_如何学Python. Does it all depend on the application? Would be helpful someone give me a link to good reference!


Consider a Trie. Here's a discussion about good implementations. This book will give more in-depth coverage.

But this approach assumes that what has already been typed is spelled correctly. If that is not a reasonable assumption, you will need to do something more sophisticated.


You can search for "autocomplete".

Here's a tutorial for a jQuery plugin that does autocomplete.

Here's a video for how it's done.

And here's really a lot of information about a detailed version.

0

精彩评论

暂无评论...
验证码 换一张
取 消