s**x 发帖数: 7506 | 1 say when you search on google, they give you list of words for
recommendation. what is the best data structure to store them in memory and
how to store them in disk?
being asked twice, want to make sure I got the correct answer.
thx! |
j**l 发帖数: 2911 | |
s**x 发帖数: 7506 | 3 that maybe the best answer, regular hashing should work as well I think.
how to store them in disk?
【在 j**l 的大作中提到】 : trie?
|
a*********0 发帖数: 2727 | 4 i believe you should store prefix rather than suffix
【在 j**l 的大作中提到】 : trie?
|
l*****a 发帖数: 559 | 5 prefix trie, use alignment algorithm to compute the score for ranking. |
s**x 发帖数: 7506 | 6
Can you share more about alightment algorithm? Thx!
【在 l*****a 的大作中提到】 : prefix trie, use alignment algorithm to compute the score for ranking.
|
z*******y 发帖数: 578 | |
h**********d 发帖数: 4313 | 8 trie is the prefix tree
【在 a*********0 的大作中提到】 : i believe you should store prefix rather than suffix
|
a*********0 发帖数: 2727 | 9 really? as far as i know, trie is a suffix tree without path collasping
【在 h**********d 的大作中提到】 : trie is the prefix tree
|
h**********d 发帖数: 4313 | 10 http://en.wikipedia.org/wiki/Trie
【在 a*********0 的大作中提到】 : really? as far as i know, trie is a suffix tree without path collasping
|
a*********0 发帖数: 2727 | |
h**********d 发帖数: 4313 | 12 interesting..thanks
【在 a*********0 的大作中提到】 : i see. actually, there is also suffix trie.. : http://marknelson.us/1996/08/01/suffix-trees/
|