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

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-zigzag-level-order-traversal/ 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가 주어졌을 때, level 별로 zigzag 순서로 nodes의 값을 적재하여 반환 level 0에서 왼쪽 → 오른쪽으로..
1. 문제 링크 https://leetcode.com/problems/binary-tree-level-order-traversal/ - LeetCode Can you solve this real interview question? - 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. 문제 설명 이진 트리의 각 레벨마다 노드 값을 모두 담은 리스트를 반환하는 것 예시) 아래 트리가 주어지면 [[3],[9,20],[15,7]]를 반환 3 / \ 9 20 / \ 15 7 3. 처음..

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. 문제 링크 Subsets II - LeetCode Subsets II - LeetCode Can you solve this real interview question? Subsets II - Given an integer array nums that may contain duplicates, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Example leetcode.com 2. 문제 설명 중복된 숫자가 포함된 배열이 주어질 때, 해당 배열의 모든 부분집합을 나열하는 문제 예시) [1, 2, 2]이 주어지면 [[..

1. 문제 링크 Word Search - LeetCode Word Search - LeetCode Can you solve this real interview question? Word Search - Given an m x n grid of characters board and a string word, return true if word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are h leetcode.com 2. 문제 설명 board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]] ..
1. 문제 링크 https://leetcode.com/problems/sort-colors/ Sort Colors - LeetCode Can you solve this real interview question? Sort Colors - Given an array nums with n objects colored red, white, or blue, sort them in-place [https://en.wikipedia.org/wiki/In-place_algorithm] so that objects of the same color are adjacent, with the colors leetcode.com 2. 문제 설명 0,1,2 세 정수로 구성된 nums라는 array가 주어졌을 때, in-plac..
1. 문제 링크 https://leetcode.com/problems/generate-parentheses Generate Parentheses - LeetCode Can you solve this real interview question? Generate Parentheses - Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. Example 1: Input: n = 3 Output: ["((()))","(()())","(())()","()(())","()()()"] Exa leetcode.com 2. 문제 설명 주어진 n쌍의 괄호로, 올바르게 구성된 괄호의 모든 조..