y*****y 发帖数: 9 | 1 之前已经过了BB的online test, 上周三BB的电面, 今天收到的onsite同志。电面是个
三哥,有口音,听起来有点sleepy,先问了一下简历的经验,然后问了一些不算太刁难
的问题:
1. what is hashing? how to solve collisions? can we use BST to solve
collisions?
2. gold bar problem
3. One missing number in a sequence of 100 numbers. Same problem, two
missing numbers. How to output repeated numbers in a sequence (in-place)
4. find pattern in a number sequence
问题都比较基础,发出来纯属为onsite攒RP. 求各位大牛给点onsite的建议,非常感谢
! |
j*****y 发帖数: 1071 | 2 1. Can we use BST to solve collisions ? yes or no ?
【在 y*****y 的大作中提到】 : 之前已经过了BB的online test, 上周三BB的电面, 今天收到的onsite同志。电面是个 : 三哥,有口音,听起来有点sleepy,先问了一下简历的经验,然后问了一些不算太刁难 : 的问题: : 1. what is hashing? how to solve collisions? can we use BST to solve : collisions? : 2. gold bar problem : 3. One missing number in a sequence of 100 numbers. Same problem, two : missing numbers. How to output repeated numbers in a sequence (in-place) : 4. find pattern in a number sequence : 问题都比较基础,发出来纯属为onsite攒RP. 求各位大牛给点onsite的建议,非常感谢
|
y*****y 发帖数: 9 | 3 我答的是可以,就是把separate chaining里面的linkedlist 换成BST就可以了。
【在 j*****y 的大作中提到】 : 1. Can we use BST to solve collisions ? yes or no ?
|
d*s 发帖数: 699 | 4 I think it is yes and no. Yes because indeed the collision can be solved
with hashtable + bst. No because if the collision is so severe that a bst is
needed, probably redesigning the hashfunction or resize the table or using
bst directly is a much better solution.
【在 j*****y 的大作中提到】 : 1. Can we use BST to solve collisions ? yes or no ?
|
d*s 发帖数: 699 | 5 what do you mean by "find pattern in a number sequence" in the last question?
【在 y*****y 的大作中提到】 : 之前已经过了BB的online test, 上周三BB的电面, 今天收到的onsite同志。电面是个 : 三哥,有口音,听起来有点sleepy,先问了一下简历的经验,然后问了一些不算太刁难 : 的问题: : 1. what is hashing? how to solve collisions? can we use BST to solve : collisions? : 2. gold bar problem : 3. One missing number in a sequence of 100 numbers. Same problem, two : missing numbers. How to output repeated numbers in a sequence (in-place) : 4. find pattern in a number sequence : 问题都比较基础,发出来纯属为onsite攒RP. 求各位大牛给点onsite的建议,非常感谢
|
l*****a 发帖数: 14598 | 6 my understanding is that:
u have
a[0] a[1] ..a[k-1]
then
a[k] ..a[2*k-1] is the same sequence as above
a[2*k] ..a[3*k-1] is the same as well
....
question?
【在 d*s 的大作中提到】 : what do you mean by "find pattern in a number sequence" in the last question?
|
t********e 发帖数: 344 | 7 How to output repeated numbers in a sequence (in place)?
这题怎么in-place? |
y*****y 发帖数: 9 | 8 不好意思没有讲清楚,实际上这个题就是出几个数出来找规律。我的题目好像是
1,2,3 6,7,8 21,22,23
question?
【在 d*s 的大作中提到】 : what do you mean by "find pattern in a number sequence" in the last question?
|
y*****y 发帖数: 9 | 9 漏了个条件,sorted的sequence....
【在 t********e 的大作中提到】 : How to output repeated numbers in a sequence (in place)? : 这题怎么in-place?
|