登录
  • #系统设计
  • #题目讨论

讨论一道大数据下返回包含给定元素的列表号的题目

九章
235
2
Given: 100k lists of 1k to 1 billion 64 bit integer

Design a system that can answer the following query quickly (minuts)

Q: Given a new list of 1k to 1 billion integers, return all the lists that have an item in common.

Assume there some overlap between lists, say 20%[[]]

L1: [1, 2, 5, 6]

L2: [1, 5, 7, 0, 12]

L3: [5, 3, 8, 9]

input: [2, 8, 13, 18]

result => [L1, L3]

这个overlap一直没想好该怎么用
2条回复
热度排序

发表回复