일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 715. Range Module
- 43. Multiply Strings
- LeetCode
- iterator
- 컴퓨터의 구조
- 시바견
- 파이썬
- Class
- Substring with Concatenation of All Words
- Protocol
- DWG
- Python
- 30. Substring with Concatenation of All Words
- Python Code
- shiba
- attribute
- 프로그래머스
- 밴픽
- 109. Convert Sorted List to Binary Search Tree
- kaggle
- Regular Expression
- Python Implementation
- 315. Count of Smaller Numbers After Self
- t1
- Convert Sorted List to Binary Search Tree
- concurrency
- Decorator
- Generator
- 운영체제
- data science
Archives
- Today
- Total
목록410. Split Array Largest Sum (1)
Scribbling
LeetCode: 410. Split Array Largest Sum
DP Solution Time complexity: O(M*N**2) class Solution: def splitArray(self, nums: List[int], m: int) -> int: self.nums = nums self.table = [0] * (len(nums)+1) summed = 0 for i in range(len(nums)): summed += nums[i] self.table[i+1] = summed self.dp = {} return self.helper(0, len(nums)-1, m) def helper(self, i, j, m): if m == 1: return self.table[j+1] - self.table[i] if i == j: return self.nums[i]..
Computer Science/Coding Test
2022. 2. 17. 10:30