일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 밴픽
- Python
- Python Implementation
- Substring with Concatenation of All Words
- 315. Count of Smaller Numbers After Self
- 30. Substring with Concatenation of All Words
- concurrency
- DWG
- iterator
- Decorator
- 파이썬
- 컴퓨터의 구조
- data science
- 시바견
- Generator
- Protocol
- attribute
- Convert Sorted List to Binary Search Tree
- Python Code
- LeetCode
- 715. Range Module
- shiba
- 운영체제
- 43. Multiply Strings
- kaggle
- 109. Convert Sorted List to Binary Search Tree
- t1
- 프로그래머스
- Class
- Regular Expression
Archives
- Today
- Total
목록95. Unique Binary Search Trees II (1)
Scribbling
LeetCode: 95. Unique Binary Search Trees II
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def generateTrees(self, n: int) -> List[Optional[TreeNode]]: return self.tree_maker([i for i in range(1, n+1)]) def tree_maker(self, nums): if not nums: return [None] ret = [] for i, num in enumerate(nums): lefts = sel..
Computer Science/Coding Test
2021. 10. 13. 20:40