Even though it wasn't stated in the statement, it looked like the map might be a maze. I used this fact which allowed me to write a dfs instead of a bfs. This meant that I didn't actually need to keep track of the map and could have only kept track of the points visited. I ended up with keeping my own stack instead of making it actually recursive as I felt that this would be less error-prone than a recursive implementation. Once I reached the oxygen system for part 1 I just printed my stack depth (which gave me an off by 1 answer) and for part 2 I just cleared the stack and visited nodes and just went out looking from the oxygen system until no new locations could be found while keeping track of the furthest distance I traveled.