Question bank › Sorting
Dsa Sorting Medium

Job Application Sorting

You are processing job applications where each application is represented by the applicant's name, the position applied for, and the date of application in the format 'Name,Position,Date'. Your task is to sort the applications by position name in alphabetical order. In case of ties, the sorting should be done by the date of application (latest first). Print the sorted applications in the same format. Input format: - The first line contains an integer n (1 ≤ n ≤ 1000), the number of applications. - The next n lines each contain an application record. Output format: - Print the sorted application records, one per line. Example: Input: 4 Alice,Developer,2023-09-15 Bob,Designer,2023-09-14 Charlie,Developer,2023-09-16 David,Manager,2023-09-13 Output: Bob,Designer,2023-09-14 David,Manager,2023-09-13 Alice,Developer,2023-09-15 Charlie,Developer,2023-09-16

Key concepts

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