由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - G家店面
相关主题
狗家面经Leetcode一题(非OJ)
感觉这里发帖求bless的人很多都有点神经质。。贡献1个A家3面的面经,被老印坑了
updae: 明天GOOG电面, 求祝福 interview 问题这题怎么做?
Facebook interview 面经[面试题求教]remove common phrases from each sentence
请教amazon面试题面试题讨论
问三道题四个月骑驴找马终于结束,发面经回馈本版
4sum的那道题这道Amazon面试题怎么做
请教leetcode的gray code问一个java的问题
相关话题的讨论汇总
话题: min话题: read话题: connection话题: path
进入JobHunting版参与讨论
1 (共1页)
x***i
发帖数: 64
1
刚店面完,口头答应recommand onsite, 不知最终如何
先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
over the phone
题目大概是这样
social network, billions id, every id has about 100 friends roughly, what is
max connections between any two ppls. write algorithm to return min
connections between two ids: int min_connection(id1, id2)
you can call following functions
expand(id) return friends list of id
expandall(list) return friends union of all the ids in the list
intersection(list1, list2) return intersection
removeintersection(list1, list2)
k*j
发帖数: 153
2
cong!!
他家到底freeze hiring了没啊

read
is

【在 x***i 的大作中提到】
: 刚店面完,口头答应recommand onsite, 不知最终如何
: 先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
: over the phone
: 题目大概是这样
: social network, billions id, every id has about 100 friends roughly, what is
: max connections between any two ppls. write algorithm to return min
: connections between two ids: int min_connection(id1, id2)
: you can call following functions
: expand(id) return friends list of id
: expandall(list) return friends union of all the ids in the list

r*******y
发帖数: 1081
3
connection means a path from one people to another people ?

read
is

【在 x***i 的大作中提到】
: 刚店面完,口头答应recommand onsite, 不知最终如何
: 先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
: over the phone
: 题目大概是这样
: social network, billions id, every id has about 100 friends roughly, what is
: max connections between any two ppls. write algorithm to return min
: connections between two ids: int min_connection(id1, id2)
: you can call following functions
: expand(id) return friends list of id
: expandall(list) return friends union of all the ids in the list

x****1
发帖数: 118
4
赞!
他家这种类型的题目貌似很多,应该好好准备。

read
is

【在 x***i 的大作中提到】
: 刚店面完,口头答应recommand onsite, 不知最终如何
: 先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
: over the phone
: 题目大概是这样
: social network, billions id, every id has about 100 friends roughly, what is
: max connections between any two ppls. write algorithm to return min
: connections between two ids: int min_connection(id1, id2)
: you can call following functions
: expand(id) return friends list of id
: expandall(list) return friends union of all the ids in the list

d***n
发帖数: 65
5
Could you define what is max connections and min connections?
a**********2
发帖数: 340
6
这题是不是就是dfs找所有路径
所有路径removeintersection就是最多连接,
最短路径就是最少连接
intersection用来判重,expandall用来添加已访问的节点
瞎猜一下,题目是不是不允许用其他数据结构,只能用list?
x***i
发帖数: 64
7
刚店面完,口头答应recommand onsite, 不知最终如何
先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
over the phone
题目大概是这样
social network, billions id, every id has about 100 friends roughly, what is
max connections between any two ppls. write algorithm to return min
connections between two ids: int min_connection(id1, id2)
you can call following functions
expand(id) return friends list of id
expandall(list) return friends union of all the ids in the list
intersection(list1, list2) return intersection
removeintersection(list1, list2)
k*j
发帖数: 153
8
cong!!
他家到底freeze hiring了没啊

read
is

【在 x***i 的大作中提到】
: 刚店面完,口头答应recommand onsite, 不知最终如何
: 先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
: over the phone
: 题目大概是这样
: social network, billions id, every id has about 100 friends roughly, what is
: max connections between any two ppls. write algorithm to return min
: connections between two ids: int min_connection(id1, id2)
: you can call following functions
: expand(id) return friends list of id
: expandall(list) return friends union of all the ids in the list

r*******y
发帖数: 1081
9
connection means a path from one people to another people ?

read
is

【在 x***i 的大作中提到】
: 刚店面完,口头答应recommand onsite, 不知最终如何
: 先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
: over the phone
: 题目大概是这样
: social network, billions id, every id has about 100 friends roughly, what is
: max connections between any two ppls. write algorithm to return min
: connections between two ids: int min_connection(id1, id2)
: you can call following functions
: expand(id) return friends list of id
: expandall(list) return friends union of all the ids in the list

x****1
发帖数: 118
10
赞!
他家这种类型的题目貌似很多,应该好好准备。

read
is

【在 x***i 的大作中提到】
: 刚店面完,口头答应recommand onsite, 不知最终如何
: 先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
: over the phone
: 题目大概是这样
: social network, billions id, every id has about 100 friends roughly, what is
: max connections between any two ppls. write algorithm to return min
: connections between two ids: int min_connection(id1, id2)
: you can call following functions
: expand(id) return friends list of id
: expandall(list) return friends union of all the ids in the list

相关主题
问三道题Leetcode一题(非OJ)
4sum的那道题贡献1个A家3面的面经,被老印坑了
请教leetcode的gray code这题怎么做?
进入JobHunting版参与讨论
d***n
发帖数: 65
11
Could you define what is max connections and min connections?
H***e
发帖数: 476
12
min 和 max connection是如何定义的阿?

read
is

【在 x***i 的大作中提到】
: 刚店面完,口头答应recommand onsite, 不知最终如何
: 先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
: over the phone
: 题目大概是这样
: social network, billions id, every id has about 100 friends roughly, what is
: max connections between any two ppls. write algorithm to return min
: connections between two ids: int min_connection(id1, id2)
: you can call following functions
: expand(id) return friends list of id
: expandall(list) return friends union of all the ids in the list

q****x
发帖数: 7404
13
what is max connection and what is min?

read
is

【在 x***i 的大作中提到】
: 刚店面完,口头答应recommand onsite, 不知最终如何
: 先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
: over the phone
: 题目大概是这样
: social network, billions id, every id has about 100 friends roughly, what is
: max connections between any two ppls. write algorithm to return min
: connections between two ids: int min_connection(id1, id2)
: you can call following functions
: expand(id) return friends list of id
: expandall(list) return friends union of all the ids in the list

q****x
发帖数: 7404
14
貌似打开了。

【在 k*j 的大作中提到】
: cong!!
: 他家到底freeze hiring了没啊
:
: read
: is

s******n
发帖数: 3946
15
呵呵,看不懂什么是max/min connection
i*******e
发帖数: 240
16
max connection = longest path?
If so, how about this one? lg 100 based (10^9) = 4.5? Very rough estimation.
So max connection = 5. Not tight bound, any other suggestion?
For min connection, shorted path should work. Scalability is likely to be the main concern.
k***t
发帖数: 276
17
Isn't finding the longest path in a graph an NP-Complete problem?

read
is

【在 x***i 的大作中提到】
: 刚店面完,口头答应recommand onsite, 不知最终如何
: 先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
: over the phone
: 题目大概是这样
: social network, billions id, every id has about 100 friends roughly, what is
: max connections between any two ppls. write algorithm to return min
: connections between two ids: int min_connection(id1, id2)
: you can call following functions
: expand(id) return friends list of id
: expandall(list) return friends union of all the ids in the list

c*****n
发帖数: 96
18

read
is
Any idea how to solve this problem ? Thanks.

【在 x***i 的大作中提到】
: 刚店面完,口头答应recommand onsite, 不知最终如何
: 先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
: over the phone
: 题目大概是这样
: social network, billions id, every id has about 100 friends roughly, what is
: max connections between any two ppls. write algorithm to return min
: connections between two ids: int min_connection(id1, id2)
: you can call following functions
: expand(id) return friends list of id
: expandall(list) return friends union of all the ids in the list

c*****n
发帖数: 96
19

read
is
Any idea how to solve this problem ? Thanks.

【在 x***i 的大作中提到】
: 刚店面完,口头答应recommand onsite, 不知最终如何
: 先聊天,took about 15 minutes.. 然后上题, 先问思路和算法,然后写pcode, read
: over the phone
: 题目大概是这样
: social network, billions id, every id has about 100 friends roughly, what is
: max connections between any two ppls. write algorithm to return min
: connections between two ids: int min_connection(id1, id2)
: you can call following functions
: expand(id) return friends list of id
: expandall(list) return friends union of all the ids in the list

c**********e
发帖数: 2007
20
Min use dijkstra? You can stop the algorithm as soon as the target is out of
the heap.
相关主题
[面试题求教]remove common phrases from each sentence这道Amazon面试题怎么做
面试题讨论问一个java的问题
四个月骑驴找马终于结束,发面经回馈本版请教一个面试算法题
进入JobHunting版参与讨论
l****o
发帖数: 43
21
mark, waiting for clarification
b***u
发帖数: 12010
22
longest path 不是npc么?

estimation.
the main concern.

【在 i*******e 的大作中提到】
: max connection = longest path?
: If so, how about this one? lg 100 based (10^9) = 4.5? Very rough estimation.
: So max connection = 5. Not tight bound, any other suggestion?
: For min connection, shorted path should work. Scalability is likely to be the main concern.

g**u
发帖数: 504
23
If "longest path" means the diameter of the network, i.e., the largest one
of those shortest path between any pair of nodes, then we can calculate it
in O(mn), here m is the number of edges. Thus, it's O(n^2).

【在 b***u 的大作中提到】
: longest path 不是npc么?
:
: estimation.
: the main concern.

1 (共1页)
进入JobHunting版参与讨论
相关主题
问一个java的问题请教amazon面试题
请教一个面试算法题问三道题
脸家电话面试面筋4sum的那道题
出一道我发明的题,难度算简单吧。请教leetcode的gray code
狗家面经Leetcode一题(非OJ)
感觉这里发帖求bless的人很多都有点神经质。。贡献1个A家3面的面经,被老印坑了
updae: 明天GOOG电面, 求祝福 interview 问题这题怎么做?
Facebook interview 面经[面试题求教]remove common phrases from each sentence
相关话题的讨论汇总
话题: min话题: read话题: connection话题: path