由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 贡献一个onsite的题,大家看看有没有什么思路
相关主题
list of words找两个没有相同字母的string S和T并且使得S.length()*T.length()最大请教个hangman game的设计题
是不是只要是search都是inverted index?问一个问题的算法实现
关于coding面试的问题急, 请教个面试问题
A电面二问另一道电话号码查询的题
Google 店面问2个BB面试问题
问个google老题的最佳解法问一道字典题解答。
String list如何排序twitter intern面经
FB面试题一道 求解问问通常所说的字典dictionary都是用什么数据结构表示的?
相关话题的讨论汇总
话题: string话题: coding话题: 贡献话题: interview话题: onsite
进入JobHunting版参与讨论
1 (共1页)
h****n
发帖数: 1093
1
大家都知道像google那种的searching box的提示一般都是trie这种数据结构
然后面试官又提了一个要求,举个例子:如果字典里有个常用词 crack the coding
interview
输入“coding interview”要求下面的提示中有 crack the coding interview
你怎么设计,用什么数据结构
这个follow up没回答好,贡献出来给大家讨论讨论
a*******y
发帖数: 1040
2
if you have inverted index, you can find all of the other string which are
greater than your input string, you can do this by hashmap storing the
string to string mapping, the second string contains the first string
f*****e
发帖数: 2992
3
后缀树的node指向起头的node?然后parent。

【在 h****n 的大作中提到】
: 大家都知道像google那种的searching box的提示一般都是trie这种数据结构
: 然后面试官又提了一个要求,举个例子:如果字典里有个常用词 crack the coding
: interview
: 输入“coding interview”要求下面的提示中有 crack the coding interview
: 你怎么设计,用什么数据结构
: 这个follow up没回答好,贡献出来给大家讨论讨论

h****n
发帖数: 1093
4
你这个方法内存开销太大了
本来用trie就是为了避免保存一个一个phrase

【在 a*******y 的大作中提到】
: if you have inverted index, you can find all of the other string which are
: greater than your input string, you can do this by hashmap storing the
: string to string mapping, the second string contains the first string

1 (共1页)
进入JobHunting版参与讨论
相关主题
问问通常所说的字典dictionary都是用什么数据结构表示的?Google 店面
G家面题问个google老题的最佳解法
两个设计题String list如何排序
单词提示是怎么实现的?FB面试题一道 求解
list of words找两个没有相同字母的string S和T并且使得S.length()*T.length()最大请教个hangman game的设计题
是不是只要是search都是inverted index?问一个问题的算法实现
关于coding面试的问题急, 请教个面试问题
A电面二问另一道电话号码查询的题
相关话题的讨论汇总
话题: string话题: coding话题: 贡献话题: interview话题: onsite