由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - FB phone interview
相关主题
CS algorithm questionEbay Skype 面经, 铁挂了,为以后攒人品吧
问个题问一个面试题
[合集] 微软面试题一道facebook telephone interview from careercup
请教一道L的题报个微软的Offer
ms onsite 杯具,攒rp发面经一个概率+编程题。
求Debug,大大们当练手吧问个题
请问一个题目寻找下一个回文数
First Missing Positive on Leetcode问个google面试题
相关话题的讨论汇总
话题: string话题: fb话题: function话题: given
进入JobHunting版参与讨论
1 (共1页)
p****6
发帖数: 724
1
有人知道这道题怎么做吗?
Given a function
getRandomTripplet()
which returns a random triplet of letters from a string. You don't know the
string using calls to this function you have to correctly guess the string.
the length of the string is also given.
Lets say the string is helloworld the function getRandomTriplet will return
things like
hlo
hew
wld
owo
the function maintains the relative order of the letters. so it will never
return
ohl since h is before o in the string.
owe since w is after e
The string is not known you are only given length of the string.
据说是FB的phone interview
A*****i
发帖数: 3587
2
题目是干啥的?是让实现这个function么?
e*****i
发帖数: 182
3
3个随机数再排下序?

the
.
return

【在 p****6 的大作中提到】
: 有人知道这道题怎么做吗?
: Given a function
: getRandomTripplet()
: which returns a random triplet of letters from a string. You don't know the
: string using calls to this function you have to correctly guess the string.
: the length of the string is also given.
: Lets say the string is helloworld the function getRandomTriplet will return
: things like
: hlo
: hew

A*****i
发帖数: 3587
4
还得加个去重

【在 e*****i 的大作中提到】
: 3个随机数再排下序?
:
: the
: .
: return

e*****i
发帖数: 182
5
恩恩,3个不同随机数。。。

【在 A*****i 的大作中提到】
: 还得加个去重
t********n
发帖数: 611
6
如果第一次从0 到n-1中随机选一个,然后在余下的n-1个index中再随机选一个,然后
再在余下的n-2 index中随机选一个,这样的index本身就不会重复了啊,然后排序,
这样可以吗?

【在 A*****i 的大作中提到】
: 还得加个去重
l***i
发帖数: 1309
7
Reservoir sampling
e*****i
发帖数: 182
8
嗯,末位交换随机数算法

【在 t********n 的大作中提到】
: 如果第一次从0 到n-1中随机选一个,然后在余下的n-1个index中再随机选一个,然后
: 再在余下的n-2 index中随机选一个,这样的index本身就不会重复了啊,然后排序,
: 这样可以吗?

s**********k
发帖数: 88
9
要求的string不能有重的字母吧。

the
.
return

【在 p****6 的大作中提到】
: 有人知道这道题怎么做吗?
: Given a function
: getRandomTripplet()
: which returns a random triplet of letters from a string. You don't know the
: string using calls to this function you have to correctly guess the string.
: the length of the string is also given.
: Lets say the string is helloworld the function getRandomTriplet will return
: things like
: hlo
: hew

r*****3
发帖数: 27
10
题目意思是让实现这个函数? 还是给了这个函数让猜string?
相关主题
求Debug,大大们当练手吧Ebay Skype 面经, 铁挂了,为以后攒人品吧
请问一个题目问一个面试题
First Missing Positive on Leetcodefacebook telephone interview from careercup
进入JobHunting版参与讨论
l****i
发帖数: 2772
11
Google,密码那题。
t********e
发帖数: 344
12
觉得是让猜string啊
类似topologic sorting?
p****6
发帖数: 724
13
要求猜回 “helloWorld” 这个词,可以run getRandomTripplet() multiple times.
p****6
发帖数: 724
14

能说说那题叫什么吗?

【在 l****i 的大作中提到】
: Google,密码那题。
m****9
发帖数: 492
15
我来抛个砖:
1. 先run getRandomTripplet() n次,2. 然后算每个letter在string出现次数,3. 然
后算letter的顺序关系。4. 拓扑排序letter。
需要考虑得是怎么确定n。确定了n,就可以用t-test测试letter的出现次数。
l****i
发帖数: 2772
16
http://www.mitbbs.com/article_t/JobHunting/32658281.html

【在 p****6 的大作中提到】
:
: 能说说那题叫什么吗?

p****6
发帖数: 724
17

拓扑排序能解决 ‘l’ 出现多次以上的问题吗?

【在 m****9 的大作中提到】
: 我来抛个砖:
: 1. 先run getRandomTripplet() n次,2. 然后算每个letter在string出现次数,3. 然
: 后算letter的顺序关系。4. 拓扑排序letter。
: 需要考虑得是怎么确定n。确定了n,就可以用t-test测试letter的出现次数。

P****2
发帖数: 197
18
Reservoir sampling。。就是包装了下
t********e
发帖数: 344
19
貌似不能。楼上帖子说是要靠频率统计

【在 p****6 的大作中提到】
:
: 拓扑排序能解决 ‘l’ 出现多次以上的问题吗?

b********r
发帖数: 620
20
对,同样的题目。
对谢大牛!

【在 l****i 的大作中提到】
: http://www.mitbbs.com/article_t/JobHunting/32658281.html
M*******a
发帖数: 1633
21
搞什么啊
水库取样是给定string,让选取ramdom元素出来
这个题目是给很多triplet,让你推出原string来。

【在 P****2 的大作中提到】
: Reservoir sampling。。就是包装了下
1 (共1页)
进入JobHunting版参与讨论
相关主题
问个google面试题ms onsite 杯具,攒rp发面经
Google 面题求Debug,大大们当练手吧
弱问:Given two binary strings, return their sum能用c做吗?请问一个题目
高人来解这道题,帮帮忙!First Missing Positive on Leetcode
CS algorithm questionEbay Skype 面经, 铁挂了,为以后攒人品吧
问个题问一个面试题
[合集] 微软面试题一道facebook telephone interview from careercup
请教一道L的题报个微软的Offer
相关话题的讨论汇总
话题: string话题: fb话题: function话题: given