Count User Logins (Singapore)

Problem Overview

  • Core task: From mobile app logs, count how many times each user logs in per day, ignoring invalid entries.
  • Input: 2D array ["/username<user_id>", "HH:MM:SS", "YYYY-MM-DD"], up to 1e5 rows.
  • Output: 2D array ["/username<user_id>", "login_date", "login_count"], sorted by user_id (lexicographic) and date ascending.
  • Context: Usage tracking for a mobile app.
  • Source: Paypal interviews (Singapore); a coding interview problem and interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: