Find Candidates With A Majority Hire Verdict From Scorecards
Last updated: November 29, 2026
Quick Overview
Given a log of (candidate, interviewer, verdict) scorecard submissions, where an interviewer may resubmit and only their latest verdict counts, return the candidates for whom strictly more than half of their interviewers recommend hire or strong hire.
Karat
November 29, 20260
0
0 solved
Given a log of (candidate, interviewer, verdict) scorecard submissions, where an interviewer may resubmit and only their latest verdict counts, return the candidates for whom strictly more than half of their interviewers recommend hire or strong hire.
This is a warm-up first part of a multi-part coding question, the kind used at the start of a 60 minute Karat-style screen before the problem grows. The interviewer checks that you clarify the dedupe rule, pick a hash map naturally, and write clean code quickly so time remains for later parts.
What the Interviewer Expects
- Ask how resubmissions and unknown verdict strings should be treated
- Deduplicate by (candidate, interviewer) keeping the latest entry
- Use a strict majority test without floating point
- Return output in a deterministic order
- Run through a small example out loud before coding
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you weight a strong hire as two votes and a strong no hire as minus two?
- What changes if the log is streamed and you must answer at any time?
- How would you return the candidates that are exactly tied?
- Scorecards now carry timestamps that can arrive out of order. What changes?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input is a list of tuples in submission order. Each (candidate, interviewer) pair counts once, using the latest verdict. A candidate qualifies if hire votes times 2 is greater than total distinct inte...
High-Level Design
Two passes. First, a dictionary keyed by (candidate, interviewer) overwritten in log order, so the last write wins. Second, fold those latest verdicts into per-candidate [hire, total] counters. Th...