[Go] Solution BFS || 100% memory || 90+% runtime
Code\n\nfunc nearestExit(maze [][]byte, entrance []int) int {\n\tq := [][2]int{{entrance[0], entrance[1]}}\n\tm, n := len(maze), len(maze[0])\n\tmaze[entrance[0
# Code\n```\nfunc nearestExit(maze [][]byte, entrance []int) int {\n\tq := [][2]int{{entrance[0], entrance[1]}}\n\tm, n := len(maze), len(maze[0])\n\tmaze[entrance[0]][entrance[1]] = \'+\'\n\n\tsteps := 0\n\tfor len(q) > 0 {\n\t\tfor _, v := range q {\n\t\t\tq = q[1:]\n\t\t\tif (v[0] == m-1 || v[1] == n-1 || v[0] == 0 || v[1] == 0) && !(v[0] == entrance[0] && v[1] == entrance[1]) {\n\t\t\t\treturn steps\n\t\t\t}\n\t\t\tfor _, div := range [][]int{{1, 0}, {-1, 0}, {0, 1}, {0, -1}} {\n\t\t\t\tx, y := v[0]+div[0], v[1]+div[1]\n\t\t\t\tif x >= 0 && y >= 0 && x < m && y < n && maze[x][y] != \'+\' {\n\t\t\t\t\tq = append(q, [2]int{x, y})\n\t\t\t\t\tmaze[x][y] = \'+\'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsteps++\n\t}\n\treturn -1\n}\n\n```
['Go']