일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- Protocol
- 시바견
- 43. Multiply Strings
- data science
- 프로그래머스
- 밴픽
- Python Code
- 컴퓨터의 구조
- DWG
- iterator
- LeetCode
- 109. Convert Sorted List to Binary Search Tree
- Decorator
- Python Implementation
- Generator
- Class
- kaggle
- attribute
- 파이썬
- t1
- 715. Range Module
- Convert Sorted List to Binary Search Tree
- 30. Substring with Concatenation of All Words
- concurrency
- Substring with Concatenation of All Words
- 315. Count of Smaller Numbers After Self
- Python
- 운영체제
- Regular Expression
- shiba
Archives
- Today
- Total
목록프로그래머스 여행 경로 (1)
Scribbling
프로그래머스: 여행경로
그냥...DFS로 푼다... from collections import defaultdict import copy def solution(tickets): tickets.sort() # dictionary["ICN"] = ["ATL", "SFO"] dictionary = defaultdict(list) for ticket in tickets: dictionary[ticket[0]].append(ticket[1]) def dfs(cur, dictionary, edges, path): if not edges: return path for v in dictionary[cur]: next_dictionary = copy.deepcopy(dictionary) next_dictionary[cur].remove(v)..
Computer Science/Coding Test
2021. 11. 1. 22:17