Question bank › Hashing
Dsa Hashing Easy

Common Friends Finder

You are given two lists of user identifiers representing two groups of friends. Write a program that finds and prints the common friends between the two groups. Each identifier is on a separate line, ending with an empty line indicating the end of input for each group. Example: Input: friend1 friend2 friend3 friend2 friend3 friend4 Output: friend2 friend3

Key concepts

hashingset operations

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 Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.