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