Skip to main content
All Questions

Find loyal customers from two days of website logs.

Unlock detailed company stats for this questionUpgrade

You are given two lists of logs, where each log entry contains a timestamp, a customerId, and a pageId. Find all loyal customers: customers who visited the website on both days and visited more than two distinct pages on each day. Discussion covered HashMap, HashSet, optimizing from multiple maps to a single map, and time and space complexity. The interviewer did not ask for code.

Expect follow-ups like

  • Optimize from multiple maps to a single map.
  • Analyze the time and space complexity.

Community answers

No answers contributed by the community yet.

Related courses

Course

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.

Course

System Design Interviews

Learn how to answer the latest system design questions across product, infrastructure, and AI domains. Features in-depth video examples, written breakdowns, and helpful reference patterns. Watch senior engineers and managers answer these questions in mock interview videos.