일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 315. Count of Smaller Numbers After Self
- Substring with Concatenation of All Words
- 109. Convert Sorted List to Binary Search Tree
- Python Implementation
- DWG
- 30. Substring with Concatenation of All Words
- 715. Range Module
- iterator
- 컴퓨터의 구조
- kaggle
- 프로그래머스
- Python
- concurrency
- 밴픽
- 43. Multiply Strings
- Convert Sorted List to Binary Search Tree
- Regular Expression
- 운영체제
- LeetCode
- t1
- shiba
- data science
- 시바견
- Python Code
- attribute
- Class
- 파이썬
- Generator
- Protocol
- Decorator
Archives
- Today
- Total
목록1011. Capacity To Ship Packages Within D Days (1)
Scribbling
LeetCode: 1011. Capacity To Ship Packages Within D Days
척보면 binary search 문제이다. class Solution: def shipWithinDays(self, weights: List[int], days: int) -> int: max_capacity = 0 for w in weights: max_capacity += w ret = max_capacity l, r = 0, max_capacity while l capacity: num_days += 1 tempsum = w return (num_days
Computer Science/Coding Test
2021. 12. 6. 20:05