标签:interview
// 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 - #)
标签:interview
原文地址:http://7371901.blog.51cto.com/7361901/1588570