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