일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- concurrency
- 운영체제
- 109. Convert Sorted List to Binary Search Tree
- kaggle
- 파이썬
- 43. Multiply Strings
- Generator
- Python
- 컴퓨터의 구조
- Substring with Concatenation of All Words
- 715. Range Module
- Protocol
- 315. Count of Smaller Numbers After Self
- shiba
- 프로그래머스
- 30. Substring with Concatenation of All Words
- Regular Expression
- 밴픽
- iterator
- Decorator
- attribute
- DWG
- t1
- Class
- data science
- Convert Sorted List to Binary Search Tree
- Python Implementation
- Python Code
- 시바견
- LeetCode
Archives
- Today
- Total
목록279. Perfect Squares (1)
Scribbling
LeetCode: 279. Perfect Squares
O(N**2) Time Complexity, O(N) Memory Not an effective solution at all especially in terms of time complexity. class Solution: def numSquares(self, n: int) -> int: INT_MAX = int(1e5) dp = [INT_MAX] * (n+1) x = 1 while x * x int: psns = [] x = 1 while x * x int: INT_MAX = int(1e5) dp = [INT_MAX] * (n+1) dp[0] = 0 for i in range(1, n+1): for j in range(1, int(i**0.5)+1): dp[i] = min(dp[i], dp[i-j*j..
Computer Science/Coding Test
2021. 12. 27. 15:11