미로 탈출

    [프로그래머스] 미로 탈출 [python]

    [프로그래머스] 미로 탈출 [python]

    문제 bfs로 풀면되는 문제이다. 출발점-> 레버 + 레버 -> 도착점 두 합의 최소를 구하면 된다. 코드 from collections import deque def solution(maps): answer = 0 startDot, leverDot, endDot = None, None, None for i in range(len(maps)): for j in range(len(maps[i])): if maps[i][j] == "S": startDot = (i,j) elif maps[i][j] == "L": leverDot = (i,j) elif maps[i][j] == "E": endDot = (i,j) else: continue startToLever = bfs(maps,startDot, leverD..