a*******y 发帖数: 1040 | 1 1. 一个array,sorted,你知道有一个数出现的次数no less than 51%, how to get
it?
2. if it is not sorted, how do you do it?
3. if given you 95% confidence to find that element, how do you find it?
4. a pond which is irregular, you cannot measure the volumn or area, but the
fish there is uniformly distributed, how do you measure how many fish are
there?
5. why SVM does not return you the hyperplane directlY? |
l*****a 发帖数: 14598 | 2 你都不会吗?
还是想看最优解
get
the
【在 a*******y 的大作中提到】 : 1. 一个array,sorted,你知道有一个数出现的次数no less than 51%, how to get : it? : 2. if it is not sorted, how do you do it? : 3. if given you 95% confidence to find that element, how do you find it? : 4. a pond which is irregular, you cannot measure the volumn or area, but the : fish there is uniformly distributed, how do you measure how many fish are : there? : 5. why SVM does not return you the hyperplane directlY?
|
a*******y 发帖数: 1040 | 3 哥哥,我是贴出来让大家玩玩,俺的店面题,基本都会
【在 l*****a 的大作中提到】 : 你都不会吗? : 还是想看最优解 : : get : the
|
i*********7 发帖数: 348 | 4 第一题,取mid值即可。因为超过了51%,表示不管这个数字的起始点在哪里,必然过
arr[mid]。
第二题,
设立一个count.初始值为1.
设立一个初始值iter为arr[0]。
然后遍历数组,当遇到同样的数字的时候count++,否则count--
当count为0的时候,重置count为1。iter为当前遍历到的值。遍历完署组织后,iter就
是要返回的数。
第三题,其实和第二题做法类似,但是只需要遍历10%的数组长度(假设知道数组长度
)即可(个人猜想)。理由和第二题类似。
第四题,我不是很明白can not measure the volumn是啥意思。我的猜想是取一定量(
譬如10升)的水(和鱼一起)。看看10升水里面有多少鱼。然后把水抽干。看看总水量
,得到鱼的数目。
第五题。看不懂。。掠过。 |
a*******y 发帖数: 1040 | 5 你那个抽水太牛了
第三题说说你问什么要遍历10%的数组?怎么达到95%的confidence的,这题要利用
boost的思想
【在 i*********7 的大作中提到】 : 第一题,取mid值即可。因为超过了51%,表示不管这个数字的起始点在哪里,必然过 : arr[mid]。 : 第二题, : 设立一个count.初始值为1. : 设立一个初始值iter为arr[0]。 : 然后遍历数组,当遇到同样的数字的时候count++,否则count-- : 当count为0的时候,重置count为1。iter为当前遍历到的值。遍历完署组织后,iter就 : 是要返回的数。 : 第三题,其实和第二题做法类似,但是只需要遍历10%的数组长度(假设知道数组长度 : )即可(个人猜想)。理由和第二题类似。
|
i*********7 发帖数: 348 | 6 好吧,我理解错了。我以为你说的95%是指重复率95%。。我再想想。统计方面不是很熟
习。
另外,第四题求提示。
【在 a*******y 的大作中提到】 : 你那个抽水太牛了 : 第三题说说你问什么要遍历10%的数组?怎么达到95%的confidence的,这题要利用 : boost的思想
|
a*******y 发帖数: 1040 | 7 第四题从sampling入手
【在 i*********7 的大作中提到】 : 好吧,我理解错了。我以为你说的95%是指重复率95%。。我再想想。统计方面不是很熟 : 习。 : 另外,第四题求提示。
|
b***e 发帖数: 1419 | 8 量密度,打上一些鱼来,然后再量密度。
【在 a*******y 的大作中提到】 : 第四题从sampling入手
|
g*****i 发帖数: 2162 | 9 赞思路.
第二题就是majority voting,如果count > 剩下没看的总数也可以直接出结果了
坐等3,6正确答案
【在 b***e 的大作中提到】 : 量密度,打上一些鱼来,然后再量密度。
|
g******2 发帖数: 234 | 10 3. take k random samples of size m, form a empirical distrbution of the
median
4. sample twice. First time sample k fish, mark them. Second time, sample m
fish, calculate the ratio of the marked fish. k/ratio is a rough estimate.
5. no idea. |