Round 1
Questions: I got asked the "distance from Dashmarts" graph question that some other posted, but basically it’s Leetcode 01 Matrix.
Candidate's Approach
- Started with a BFS from all the "1"s at once, which takes O(MN) and is optimal.
- Initially proposed an inefficient solution but acknowledged it and took time to think of a more efficient way.
- Factored out the code into functions like
getNeighbors
and defined constants for better readability and maintainability.
Interviewer's Feedback
No feedback provided.