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