a**********2 发帖数: 340 | 1 1.一组用户信息,包括first name, last name,phone number等等,设计一个结构存
储这些信息,能够动态添加,并且能根据first name或者last name进行查找。
我就想到用两个multimap存储,不知道有什么好的思路
2.顺便问道老题
In our indexes, we have millions of URLs each of which has a link to some
page contents, that is, URL->contents. Now, suppose a user types a query
with wild cards *, which represent 0 or multiple occurrences of any
characters, how do you build the indexes such that such a type of query can
be executed efficiently by finding all corresponding URLs->contents
efficiently. For example, given a query http://www.*o*ve*ou.com. You need to find iloveyou.com, itveabcu.com, etc | k****n 发帖数: 369 | 2
这不就是传统数据库么。。。
数据放在一个静态数组或者list里面,用BTREE或者HASHMAP做name的index
can
老题就看经典好了,IR领域的经典题,看怎么做模糊检索
大概就是做cyclic suffix tree,或者bi/tri-gram的index什么的
但是为什么这个能match到itveabcu呢?最起码结尾应该是ou吧?
【在 a**********2 的大作中提到】 : 1.一组用户信息,包括first name, last name,phone number等等,设计一个结构存 : 储这些信息,能够动态添加,并且能根据first name或者last name进行查找。 : 我就想到用两个multimap存储,不知道有什么好的思路 : 2.顺便问道老题 : In our indexes, we have millions of URLs each of which has a link to some : page contents, that is, URL->contents. Now, suppose a user types a query : with wild cards *, which represent 0 or multiple occurrences of any : characters, how do you build the indexes such that such a type of query can : be executed efficiently by finding all corresponding URLs->contents : efficiently. For example, given a query http://www.*o*ve*ou.com. You need to find iloveyou.com, itveabcu.com, etc
|
|