n**********E 发帖数: 157 | 1 45mins, 3 questions:
1. how to implement priority queue (describe) ?
2. insert a node to a sorted linked list (coding)
3. what data structure to use to store anagram (describe) ? asked the
details
of how to design a proper hash function |
m********l 发帖数: 89 | 2 第三问怎么做了? 各位大牛指点一下。。。
3. what data structure to use to store anagram (describe) ? asked the
details
【在 n**********E 的大作中提到】 : 45mins, 3 questions: : 1. how to implement priority queue (describe) ? : 2. insert a node to a sorted linked list (coding) : 3. what data structure to use to store anagram (describe) ? asked the : details : of how to design a proper hash function
|
t*****j 发帖数: 1105 | 3 int array[26]?
不晓得这题具体是让干嘛....
【在 m********l 的大作中提到】 : 第三问怎么做了? 各位大牛指点一下。。。 : 3. what data structure to use to store anagram (describe) ? asked the : details
|
h***o 发帖数: 1494 | 4 到底anagram是个什么东西呀?
广看到这个,有谁给举个例子吗? |
a****n 发帖数: 1887 | 5 hash table一般用来找互为anagram的words, |
n**********E 发帖数: 157 | 6
update:
anagram 那道题先问了用什么data structure,回答hash table,然后就问用什么hash
function.最后经过interviewer的无数提示,得到答案。首先找到每一个char对应的
int,然后sort。
【在 n**********E 的大作中提到】 : 45mins, 3 questions: : 1. how to implement priority queue (describe) ? : 2. insert a node to a sorted linked list (coding) : 3. what data structure to use to store anagram (describe) ? asked the : details : of how to design a proper hash function
|
c******t 发帖数: 1500 | 7 刚google了一下,请问楼主,最后一题是不是“Determine and display all anagrams
in a string array”?
否则有点儿不懂题目的意思,呵呵 |
a****t 发帖数: 720 | 8 bless~~~
【在 n**********E 的大作中提到】 : 45mins, 3 questions: : 1. how to implement priority queue (describe) ? : 2. insert a node to a sorted linked list (coding) : 3. what data structure to use to store anagram (describe) ? asked the : details : of how to design a proper hash function
|
x***y 发帖数: 633 | 9 Then, this is not hash table. It's like a map, which maps the minimum
representation of the anagram to a list of corresponding anagrams.
like "act" can map to the list: "cat act tac"
hash
【在 n**********E 的大作中提到】 : : update: : anagram 那道题先问了用什么data structure,回答hash table,然后就问用什么hash : function.最后经过interviewer的无数提示,得到答案。首先找到每一个char对应的 : int,然后sort。
|
y*********e 发帖数: 518 | 10 对头,是一个hash_map。
此题是Programming Pearls上第二章的例题。:)
【在 x***y 的大作中提到】 : Then, this is not hash table. It's like a map, which maps the minimum : representation of the anagram to a list of corresponding anagrams. : like "act" can map to the list: "cat act tac" : : hash
|