3 ms·
You can generalize to > Now, given two N log files we want to generate a list of ‘loyal customers’ that meet the criteria of: (a) they came on ALL days, and (b
by xoranth 3y ago
You can generalize to
> Now, given two N log files we want to generate a list of ‘loyal customers’ that meet the criteria of: (a) they came on ALL days, and (b) they visited at least L unique pages.
while keeping linear time complexity and
O(num records in first file * L)
memory complexity. It is not too different from the solution given in the article (just use 3 maps instead of two).
That means that multiple files doesn't need out-of-core if the maps for one file at a time fit memory.