0
Goldman Sack Interview Questions
Posted by Derek Jing
on
1:47 PM
in
Interview
- What's the distribution of the stopping time T=min{t>=0: W(t)>100}?
- 船里有人, 人手里有东西, 东西扔下去, 沉了, 然后问, 水面怎么涨, 船水位怎么涨?
- 如何求sqrt, 我说牛顿算法, 和binary search, 然后问我, binary search 有什么
问题, sqrt(35) 和sqrt(37) binary search都一样么? 怎么改进? 用牛顿和binary search有什么区别, 分别什么时候用.
如果是让我们算sqrt(35)或sqrt(37),是不是可以这样心算?
sqrt(37) = 6+x = sqrt(36 + 12 x + x^2)
12x + x^2 = 12 x = 1 ==> x=0.08
so, sqrt(37)=6.08
我计算器算的是6.083
- 绑匪绑架了女儿, 要从一个杂志里面cut paste一个note, 写一个function, 判断是
否可以写这个note, 两个input, 一个杂志的string, 一个是note的string, 返回bool.
(可以构造一个hash,count每个character出现的次数。要求对于每个character,
note的次数要<=杂志的次数。)
Post a Comment