55

如何判断一个元素在亿级数据中是否存在?

 5 years ago
source link: https://juejin.im/post/5bfc90be5188254e2a04374b
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
前言 最近有朋友问我这么一个面试题目: 现在有一个非常庞大的数据,假设全是 int 类型。现在我给你一个数,你需要告诉我它是否存在其中(尽量高效)。 需求其实很清晰,只是要判断一个数据是否存在即可。 但这里有一个比较重要的前提:非常庞大的数据。 常规实现

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK