Question bank › Hashing
Dsa Hashing Easy

Phone Number Mapping

You are given a list of phone numbers. Some numbers may appear multiple times. Create a new list where each phone number is mapped to the number of times it appears in the original list in the format: 'phone_number: count'. Input Format: A single line of space-separated phone numbers (strings). Output Format: A list of strings formatted as 'phone_number: count'. Each entry should appear in the order of their first appearance. Example: Input: 1234567890 1234567890 9876543210 Output: 1234567890: 2 9876543210: 1

Key concepts

hashingdictionariesstring manipulation

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.