본문 바로가기

DFS5

[Leetcode/JS] 257. Binary Tree Paths 문제링크 https://leetcode.com/problems/binary-tree-paths/ Binary Tree Paths - LeetCode Can you solve this real interview question? Binary Tree Paths - Given the root of a binary tree, return all root-to-leaf paths in any order. A leaf is a node with no children. Example 1: [https://assets.leetcode.com/uploads/2021/03/12/paths-tree.jpg] In leetcode.com 기억하면 좋을 것 JavaScript에서 배열을 새로운 변수에 할당하는 경우 새로운 배.. 2023. 7. 17.
[Leetcode/JS] 404. Sum of Left Leaves 문제링크 404. Sum of Left Leaves https://leetcode.com/problems/sum-of-left-leaves/description/ Sum of Left Leaves - LeetCode Can you solve this real interview question? Sum of Left Leaves - Given the root of a binary tree, return the sum of all left leaves. A leaf is a node with no children. A left leaf is a leaf that is the left child of another node. Example 1: [https://ass leetcode.com Given the .. 2023. 7. 17.
[Leetcode/JS] 111. Minimum Depth of Binary Tree 문제링크 111. Minimum Depth of Binary Tree https://leetcode.com/problems/minimum-depth-of-binary-tree/description/ Minimum Depth of Binary Tree - LeetCode Can you solve this real interview question? Minimum Depth of Binary Tree - Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node. Note: A leaf.. 2023. 7. 13.
[leetcode/JS] 617. Merge Two BInary Trees / Javascript 문제링크 https://leetcode.com/problems/merge-two-binary-trees/ Merge Two Binary Trees - 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. 어떻게 반복 할 것인지 2. 어떤 조건에서 return, 종료 해 줄것인지 가 핵심임을 기억하자 지금은 실력이 부족하니 어떻게 해야 효율적으로 풀지 생각하기보다 일단 푸는것을 목적으로 .. 2022. 5. 12.