일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 릿코드풀기
- 잇츠디모
- python priority queue
- binary search
- 파이썬 프로그래머스
- leetcode풀이
- 파이썬릿코드풀기
- 파이썬릿코드
- 파이썬 알고리즘 풀기
- 릿코드풀이
- python zip_longest
- LeetCode
- 상가수익률계산기
- 파이썬알고리즘풀기
- python Leetcode
- 알고리즘풀이
- leetcode풀기
- leetcode 풀기
- 릿코드 파이썬
- 파이썬 알고리즘
- 릿코드 풀기
- 릿코드
- 파이썬알고리즘
- 파이썬 릿코드
- 코틀린기초
- python xor
- 알고리즘풀기
- python sorted
- python 릿코드
- python 알고리즘
- Today
- Total
목록파이썬트리 (2)
소프트웨어에 대한 모든 것
1302. Deepest Leaves Sum https://leetcode.com/problems/deepest-leaves-sum/ Deepest Leaves Sum - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제) 솔루션1) hashtable을 사용해서 각 depth의 노드에 해당하는 모든 val 값들을 list 형태로 저장한다. hashtable에서 최대 depth에 O(1)로 접근해서 모든 values의 sum을 구하면 그것이 deepest lea..
226. Invert Binary Tree 문제) Given the root of a binary tree, invert the tree, and return its root. 솔루션1) # 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 invertTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]: self.invert(root) return root def invert(se..