PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Pinterest

Cross-reference logs to flag spam numbers

Last updated: May 13, 2026

Quick Overview

This question evaluates proficiency with data structures (such as hash maps), parsing and deduplication, frequency counting, input validation, and analysis of time and space complexity.

  • Medium
  • Pinterest
  • Coding & Algorithms
  • Software Engineer

Cross-reference logs to flag spam numbers

Company: Pinterest

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

You are given two data sets: ( 1) a call log containing phone numbers observed in calls and ( 2) a list of user reports where each entry is a phone number reported as spam (potentially with duplicates). Parse and cross-reference these inputs to output each spam phone number present in the call log and the number of times it was reported. Describe the algorithm, data structures (e.g., hash maps), handling of invalid numbers, and time/space complexity. Provide code in your preferred language.

Quick Answer: This question evaluates proficiency with data structures (such as hash maps), parsing and deduplication, frequency counting, input validation, and analysis of time and space complexity.

Related Interview Questions

  • Maximize Boxes Stored Through One Entrance - Pinterest (medium)
  • Solve Multiple Coding Interview Problems - Pinterest (medium)
  • Implement a Sparse Matrix Class - Pinterest (medium)
  • Assign Pins to Shortest Columns - Pinterest (medium)
  • Design Hierarchical Permission Checks - Pinterest (medium)
Pinterest logo
Pinterest
Sep 6, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
5
0

You are given two data sets: (

  1. a call log containing phone numbers observed in calls and (
  2. a list of user reports where each entry is a phone number reported as spam (potentially with duplicates). Parse and cross-reference these inputs to output each spam phone number present in the call log and the number of times it was reported. Describe the algorithm, data structures (e.g., hash maps), handling of invalid numbers, and time/space complexity. Provide code in your preferred language.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Pinterest•More Software Engineer•Pinterest Software Engineer•Pinterest Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.