Design Manhattan-distance meeting point finder
Company: Snapchat
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: Medium
Interview Round: Technical Screen
Quick Answer: This question evaluates algorithmic problem-solving and data-structure design skills for geometric aggregation problems, focusing on properties of Manhattan distance, handling dynamic updates, and analyzing time/space complexity within the Coding & Algorithms domain.
Constraints
- Inputs are Python literals matching the function signature.
- Return a deterministic exact-match value.
Examples
Input: ([[1,0,0],[0,0,1],[0,1,0]],)
Expected Output: [[1, 1], 4]
Explanation: Median row and column minimize Manhattan distance.
Input: ([[0,0]],)
Expected Output: [None, 0]
Explanation: No homes returns None and zero distance.
Hints
- Clarify edge cases before coding.
- Keep the return value deterministic.