Back to problems

Email Log Processing / Grouping and Sorting

Algorithm · Stripe · Easy

Problem You are given a list of email event logs. Each log is a string with the following format: timestamp: a non‑negative integer (seconds since epoch). sender_email, receiver_email: strings containing no spaces. subject: the rest of the line after the first three tokens; it may contain spaces or be empty. Your task is to group the logs by sender, sort each group according to specific rules, and return the formatted result. Rules Group all logs by sender_email. Within each…

Checking your access…