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