⌘K
Flycodx

HR's Smart Resume Shortlisting Algorithm

HR's Smart Resume Shortlisting Algorithm

HardArrays100% accepted

An HR manager at Infosys receives candidate resumes on Naukri with experience years, skill match scores (0-100), and education ratings. She shortlists top K candidates using weighted score: (2*experience + 3*skill_score + 1*education). Find the top K candidates. Rule: score = 2*experience + 3*skill + 1*education. Pick the top k by score (earlier resume wins ties) and return them in their ORIGINAL order. Your solve(...) function receives the inputs as ready-made arguments — no input reading or parsing needed; just return the answer.

Approach

Given resumes [[experience, skill_score, education]] and integer K, return top K candidates by composite score (2*exp + 3*skill + 1*edu).

Input

resumes=[[5,80,4],[3,90,3],[8,70,5],[2,95,2]] k=2

Output

[[3,90,3],[2,95,2]]
solution.py
Loading editor...
Test 1
Test 2
Test 3

Press Run to test your custom input, or Submit to judge against all test cases.

Sign in to continue

Create a free account to run code, submit solutions and track progress.

  • Free forever — no credit card
  • 10+ languages with live execution
  • Points, streaks & leaderboards
Auto Save OnLn 1, Col 1Spaces: 4UTF-8LFPython 3