일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- binary search
- linked list
- easy
- 쉬움
- leetcode
- recursive
- Depth-first Search
- 리트코드
- list
- Medium
- sorting
- binary tree
- 미디움
- DP
- Python
- tree
- 중간
- 문자열
- string
- math
- matrix
- 재귀
- hash table
- Binary
- backtracking
- two pointers
- 이진트리
- Array
- HashTable
- dfs
- Today
- Total
목록Depth-first Search (7)
부부의 코딩 성장 일기

1. 문제 링크 https://leetcode.com/problems/path-sum-ii/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 2. 문제 설명 이진트리의 root와 targetSum이라는 정수가 주어졌을 때, 각 노드의 합이 targetSum과 같으면서 root-to-leaf로 가는 모든 path를 구해서 list에 저장하여..

1. 문제 링크 https://leetcode.com/problems/binary-tree-paths/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 2. 문제 설명 binary tree의 root가 주어졌을 때, root부터 leaf까지 가는 모든 paths를 list에 append하여 반환 여기서 leaf란 children이 없는 n..

1. 문제 링크 https://leetcode.com/problems/invert-binary-tree/ LeetCode - The World's Leading Online Programming Learning Platform 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 2. 문제 설명 binary tree의 root가 주어졌을 때, 이를 invert한 root를 반환 예시) input이 [4,2,7,1,3,6,9] 이면 output이 [4,7,2,9,6,3,1]로 각 노드의..
1. 문제 링크 https://leetcode.com/problems/binary-tree-preorder-traversal/ Binary Tree Preorder Traversal - LeetCode Can you solve this real interview question? Binary Tree Preorder Traversal - Given the root of a binary tree, return the preorder traversal of its nodes' values. Example 1: [https://assets.leetcode.com/uploads/2020/09/15/inorder_1.jpg] Input: root = [1, leetcode.com 2. 문제 설명 이진 트리의 r..
1. 문제 링크 https://leetcode.com/problems/path-sum/ Path Sum - LeetCode Can you solve this real interview question? Path Sum - Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals targetSum. A leaf is a node with no ch leetcode.com 2. 문제 설명 이진 트리 root와, 정수 targetSum가 주어졌을 때, root에서 leaf로 이어..
1. 문제 링크 https://leetcode.com/problems/maximum-depth-of-binary-tree/ Number of 1 Bits - LeetCode Can you solve this real interview question? Number of 1 Bits - Write a function that takes the binary representation of an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight [http://en.wikipedia.org/wiki/Hamming_w leetcode.com 2. 문제 설명 이진 트리 root가 주어졌을 때, 최대 ..
1. 문제 링크 https://leetcode.com/problems/same-tree/ Same Tree - LeetCode Can you solve this real interview question? Same Tree - Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical, and the nodes have the leetcode.com 2. 문제 설명 이진 트리 p, q가 주어졌을 때, 두 트리가 같은 tree인지 판단 같다의 정의: 구조..