Back to problems

Two-Day Log Intersection under Memory Limit

Algorithm · Google · Medium

Requirements Input consists of two log files, with records formatted as (timestamp, obj_id, client_id). Return every obj_id that meets both conditions below: (a) it occurs in each file, and (b) considering records from both files together, it is linked to at least 2 different client_id values. Follow-up 1: What is the complexity of intersecting the contents of the two files using sets? Follow-up 2: Suppose memory is too limited to load either complete file. Describe a…

Checking your access…