Question bank › Sorting
Dsa Sorting Easy

Event Registration List

You are organizing an event and have a list of participants who registered. Each participant's registration includes a name and an email. Your task is to create a list of unique participants sorted by their names in ascending order. Input format: The first line contains an integer R (1 <= R <= 1000) — the number of registrations. The next R lines contain a name (a string) and an email (a string), separated by a space. Output format: Print the sorted list of unique participants, each on a new line with their name. Example: Input: 4 Alice alice@example.com Bob bob@example.com Alice alice@example.com Charlie charlie@example.com Output: Alice Bob Charlie

Key concepts

sortingsetsdata_cleaning

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.