New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Stripe
Coding Question
AI Insights
Quick Summary
Compute a weighted similarity score between a target user and every other profile based on exact field matches.
Return the IDs of all profiles whose similarity score meets or exceeds a specified threshold.
Exclude the target profile itself and handle cases where the target does not exist.
What This Tests
Efficient data parsing and header-to-index mapping
Hash-based lookups for field weights and ID tracking
Accumulating weighted scores during single-pass iteration
Handling edge cases like missing targets and self-comparison
Common Patterns
Hashing
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected