일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 109. Convert Sorted List to Binary Search Tree
- Python Code
- 315. Count of Smaller Numbers After Self
- Protocol
- iterator
- 프로그래머스
- Python
- attribute
- DWG
- Python Implementation
- 컴퓨터의 구조
- Substring with Concatenation of All Words
- LeetCode
- concurrency
- 30. Substring with Concatenation of All Words
- shiba
- kaggle
- Regular Expression
- t1
- 파이썬
- Generator
- Class
- 715. Range Module
- 밴픽
- Convert Sorted List to Binary Search Tree
- 시바견
- 43. Multiply Strings
- data science
- 운영체제
- Decorator
Archives
- Today
- Total
목록Minimum Path Sum (1)
Scribbling
LeetCode: 64. Minimum Path Sum
가장 먼저 떠오르는 방법은 완전 탐색 --> Time Limit Exceeded class Solution: def minPathSum(self, grid: List[List[int]]) -> int: n, m = len(grid), len(grid[0]) dp = [[int(1e9)] * m for _ in range(n)] self.explorer(dp, grid, 0, 0, 0) return dp[n-1][m-1] def explorer(self, dp, grid, i, j, nowSum): nowSum += grid[i][j] if i == len(grid) - 1 and j == len(grid[0]) - 1: dp[i][j] = min(dp[i][j], nowSum) return if nowS..
Computer Science/Coding Test
2021. 9. 24. 21:35