Minimize Total Assignment Distance
Company: Dark Alpha Capital
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Quick Answer: This question evaluates competency in combinatorial optimization, assignment/matching problems, and reasoning about Manhattan distance cost metrics. Commonly asked to assess algorithmic reasoning about constrained assignments, search and complexity trade-offs, it belongs to the Coding & Algorithms domain and emphasizes practical application of algorithm design and implementation rather than purely conceptual theory.
Constraints
- Inputs are Python literals matching the function signature.
- Return a deterministic exact-match value.
Examples
Input: ([(0,0),(2,2)], [(0,1),(2,3),(10,10)])
Expected Output: 2
Explanation: Assign each analyst to a distinct nearest combination.
Input: ([(0,0)], [(5,5),(1,1)])
Expected Output: 2
Explanation: Single analyst picks closest device.
Hints
- Clarify edge cases before coding.
- Keep the return value deterministic.