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