Design a Multi-Round Resume Screening Ranker
Model weighted, round-specific scoring criteria that narrow a pool of resumes to the top K in each round until one candidate is left.
A hiring team has N resumes and wants to find the one best candidate through several screening rounds. Each round looks at its own criteria, such as CGPA, academic marks, or location.
Each criterion has a weight, and a candidate's score in a round adds up weight × criterion value (for example, CGPA × 5 plus the other weighted parts). Only the top K candidates of a round move on to the next round.
Later rounds can add new criteria, K can be different in every round, and the final round keeps exactly one candidate.
For this exercise, assume: - The rounds, their criteria, weights, and K values are set before a screening run starts, and the final round has K = 1. - Every criterion turns one resume attribute into a number with a fixed rule. A numeric attribute such as CGPA or marks is used as it is.
A location criterion gives 1 when the resume's location is in the round's preferred list and 0 otherwise. Higher scores are better. - Each round scores the remaining candidates from scratch. Scores from earlier rounds do not carry over.
- When candidates tie at a round's cut-off, the one with the smaller resume ID moves on, so the same input always gives the same result. - If a round's K is at least the number of remaining candidates, all of them move on. - A run has at least one resume.
If any resume is missing an attribute that a configured criterion needs, the whole run fails with an error that names that resume and attribute, before any round is scored. - One run handles up to 100,000 resumes, up to 10 rounds, and up to 10 criteria per round, in memory.
Parsing resume files, storage, a user interface, and running several screenings at the same time are out of scope.
Design the classes, their responsibilities, and their public contracts in C++ or another object-oriented language, then walk through one full screening run. Be ready to explain which data structure keeps each round's top K and why.