Algorithms & Data Structuresmedium
Cross-Reference Logs to Flag Spam Numbers
You are given two logs:
callLog = [[caller, callee], ...] // phone calls made reports = [[reporter, number], ...] // users reporting a number as spam
A report is valid only if the reporter actually received a call from the number they reported (cross-referencing — this filters fake or mistaken reports). Flag every number with at least minReports distinct valid reporters. Return the flagged numbers sorted.