F design# JobHunting - 待字闺中
f*a
1 楼
类似于这题:
How would you implement live search for people's names (only firstname and
lastname, or lastname and firstname) like in facebook's search, retreiving
the top 5, knowing a value between 0 and 1 for every one of them. If you are
close friends then the value will be bigger. You should output the first 5
values in descending order.
想到trie。找前5怎么在tire上面加数据结构?
How would you implement live search for people's names (only firstname and
lastname, or lastname and firstname) like in facebook's search, retreiving
the top 5, knowing a value between 0 and 1 for every one of them. If you are
close friends then the value will be bigger. You should output the first 5
values in descending order.
想到trie。找前5怎么在tire上面加数据结构?