New
The Learning module is now live
See what's new
×
Question Bank
Learning
NEW
Pricing
Blog
Forum
HOT
JobRadar
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Square
Coding Question
AI Insights
Quick Summary
Match socks that share the same color but are designed for opposite feet.
Each sock can only belong to one pair, and all IDs are unique.
Return a list of paired sock IDs without duplicates or leftovers.
What This Tests
Hash table grouping and lookup efficiency
Parallel array traversal and data synchronization
Greedy selection for optimal pairing
Handling large input sizes within time constraints
Common Patterns
Hashing
Sorting
Greedy
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.7-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected