# Nearest Exit from Entrance in Maze (LeetCode 1926)
## Approach
BFS from entrance; first border cell distance.
## Edge cases
Confirm constraints (n, value ranges) before coding. State time and space complexity up front in interviews.
## Practice tip
Talk through invariants while coding so the interviewer can follow your reasoning.
Practice with [AI interview copilot](https://www.linkjob.ai/interview-copilot/).