// can hold all numbers. // Cheating! // Do we know the max or min? // Consider using bitmap // If 1 billion numbers also spread a lot. // 1. Hash-split into K smaller pieces. Just % n. Thinking about how to handle negative numbers. // Dealing with the small files. // Maintain a min heap with 1 million. (so said) // Random select K as pivok. // Track numbers bigger than K. // If # > 1m, pivot right, to find 1m // else, pivot left, (1m - #)
CC150 20.6
原创furuijie8679 博主文章分类:Interview ©著作权
©著作权归作者所有:来自51CTO博客作者furuijie8679的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:CC150 20.5
下一篇:CC150 20.7
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章