Find returning users from access logs

Quick Overview

This question evaluates skills in time-series data processing, timestamp parsing and time-zone normalization, scalable stream or batch handling for logs that exceed memory, algorithmic complexity analysis, and test-case design for edge conditions such as midnight boundaries and duplicate events.

Find returning users from access logs

Company: Amazon

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Given an unordered log of web access events, identify which users are returning (i.e., they have visited on at least two different calendar days). Each event is a tuple (user_id, timestamp_iso 8601). Output the set of user_ids that meet the criterion. Address: 1) parsing and time-zone normalization; 2) handling large logs that don't fit in memory; 3) algorithmic complexity; 4) test cases including edge cases near midnight and duplicate events.

Quick Answer: This question evaluates skills in time-series data processing, timestamp parsing and time-zone normalization, scalable stream or batch handling for logs that exceed memory, algorithmic complexity analysis, and test-case design for edge conditions such as midnight boundaries and duplicate events.

|Home/Coding & Algorithms/Amazon
Amazon logo
Amazon
Sep 6, 2025, 12:00 AM
mediumSoftware EngineerOnsiteCoding & Algorithms
1
0

Given an unordered log of web access events, identify which users are returning (i.e., they have visited on at least two different calendar days). Each event is a tuple (user_id, timestamp_iso 8601). Output the set of user_ids that meet the criterion. Address:

  1. parsing and time-zone normalization;
  2. handling large logs that don't fit in memory;
  3. algorithmic complexity;
  4. test cases including edge cases near midnight and duplicate events.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...