Object-Oriented Programming · Pinterest · Medium
A company applies machine learning to flag rule-breaking user posts. You need to design a violation log analyzer that is initialized with a list of log entries that are sorted by date. The analyzer must handle queries returning distinct counts based on post ID, policy, and date. Each log entry provides: postId: A unique string identifier for the post (e.g., "0", "p123"). policy: The category of violation (e.g., "spam", "privacy", "child"). date: The date the violation was…
Checking your access…