일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Python
- 30. Substring with Concatenation of All Words
- data science
- 운영체제
- Regular Expression
- t1
- kaggle
- Substring with Concatenation of All Words
- Python Code
- 시바견
- iterator
- Convert Sorted List to Binary Search Tree
- 프로그래머스
- Python Implementation
- 파이썬
- 컴퓨터의 구조
- 315. Count of Smaller Numbers After Self
- shiba
- attribute
- Decorator
- DWG
- 715. Range Module
- 밴픽
- Class
- Generator
- 109. Convert Sorted List to Binary Search Tree
- Protocol
- 43. Multiply Strings
- LeetCode
- concurrency
- Today
- Total
목록Computer Science (392)
Scribbling
다익스트라 알고리즘을 활용하여 푼다. import heapq class Solution: def networkDelayTime(self, times: List[List[int]], n: int, k: int) -> int: INF = int(1e9) graph = [[] for _ in range(n+1)] distance = [INF] * (n+1) for time in times: u = time[0] v = time[1] w = time[2] graph[u].append((w, v)) self.dijkstra(graph, distance, k) max_dist = 0 for i in range(1, n+1): max_dist = max(max_dist, distance[i]) if max_dist ..
1. 노가다성 답안 class Solution: def addTwoNumbers(self, l1, l2, up=0): if l1 != None and l2 != None: val1 = l1.val val2 = l2.val val = (val1 + val2 + up) % 10 up = (val1 + val2 + up) // 10 ret_node = ListNode(val=val) ret_node.next = self.addTwoNumbers(l1.next, l2.next, up=up) elif l1 == None and l2 != None: val2 = l2.val val = (val2 + up) % 10 up = (val2 + up) // 10 ret_node = ListNode(val=val) ret_..