일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 315. Count of Smaller Numbers After Self
- attribute
- 109. Convert Sorted List to Binary Search Tree
- 30. Substring with Concatenation of All Words
- Regular Expression
- Python Code
- Protocol
- Convert Sorted List to Binary Search Tree
- LeetCode
- 시바견
- Class
- 밴픽
- 프로그래머스
- data science
- 파이썬
- kaggle
- DWG
- Generator
- shiba
- iterator
- 운영체제
- t1
- Python
- 컴퓨터의 구조
- Python Implementation
- 715. Range Module
- Substring with Concatenation of All Words
- 43. Multiply Strings
- Decorator
- concurrency
Archives
- Today
- Total
목록Word Ladder II (1)
Scribbling
LeetCode: 126. Word Ladder II
개인적으로 어려웠던 문제... A. 내가 푼 방법 일단 내가 푼 방법은 아래와 같다. 1) 모든 word에 대해 graph를 그린다. (word간 글자가 1개만 차이나는 경우 연결) 2) 다익스트라 알고리즘으로 최단 경로를 찾는다. 나름 머리 써서 푼건데, 속도도 느리고 메모리 효율도 떨어져서 실망스럽다. import heapq class Solution: def findLadders(self, beginWord: str, endWord: str, wordList: List[str]) -> List[List[str]]: if endWord not in wordList: return [] if beginWord not in wordList: wordList.append(beginWord) s_idx = w..
Computer Science/Coding Test
2021. 10. 6. 21:43