![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
面试笔试题
文章平均质量分 84
CS_ChenLI
Let's start coding!
展开
-
The termination conditions about the binary search
About some thoughts of binary search: To avoid some confusion of the binary search, like dead-loop or something. Every time i write binary search, i always use the 'while' condition like this: int原创 2016-11-04 11:09:16 · 585 阅读 · 0 评论 -
100亿个整数,内存足够,如何找到中位数?内存不足,如何找到中位数?
首先必须清楚中位数的定义: 中位数(又称中值,英语:Median),统计学中的专有名词,代表一个样本、种群或概率分布中的一个数值,其可将数值集合划分为相等的上下两部分。对于有限的数集,可以通过把所有观察值高低排序后找出正中间的一个作为中位数。如果观察值有偶数个,通常取最中间的两个数值的平均数作为中位数。 然后这个题答案: 内存足够的情况: 可以使⽤用类似quick sort的转载 2016-09-28 14:10:10 · 2273 阅读 · 0 评论