#33 [파이썬] 프로그래머스: 여행경로
https://programmers.co.kr/learn/courses/30/lessons/43164 코딩테스트 연습 - 여행경로 [["ICN", "SFO"], ["ICN", "ATL"], ["SFO", "ATL"], ["ATL", "ICN"], ["ATL","SFO"]] ["ICN", "ATL", "ICN", "SFO", "ATL", "SFO"] programmers.co.kr from collections import defaultdict def dfs(dic, route, n): if len(route) == n+1: return route for i, r in enumerate(dic[route[-1]]): dic[route[-1]].pop(i) answer = dfs(dic, route+[r],..
2022. 3. 12.