일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Regular Expression
- 컴퓨터의 구조
- 109. Convert Sorted List to Binary Search Tree
- 프로그래머스
- DWG
- Substring with Concatenation of All Words
- 시바견
- 파이썬
- Python Code
- 315. Count of Smaller Numbers After Self
- Generator
- concurrency
- 30. Substring with Concatenation of All Words
- kaggle
- Class
- attribute
- Convert Sorted List to Binary Search Tree
- data science
- LeetCode
- Python Implementation
- 밴픽
- Decorator
- iterator
- shiba
- 운영체제
- Python
- 715. Range Module
- t1
- Protocol
- 43. Multiply Strings
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