목록Algorithm/Graph(DFS, BFS and so on)_Tree (2)
5 DERECHA
[LeetCode][Tree/DFS/BFS/Morris Traversal] 144. Binary Tree Preorder Traversal
[English] [Korean] Given the root of a binary tree, return the preorder traversal of its nodes' values.
Algorithm/Graph(DFS, BFS and so on)_Tree
2023. 1. 15. 23:09
[LeetCode][Union-Find] 2421. Number of Good Paths
[English] [Korean] [문제 해석] There is a tree (i.e. a connected, undirected graph with no cycles) consisting of n nodes numbered from 0 to n - 1 and exactly n - 1 edges. 트리는 사이클이 없는 무방향 그래프이다. n개의 노드(정점)와 n-1개의 간선으로 구성된 트리가 있다. You are given a 0-indexed integer array vals of length n where vals[i] denotes the value of the ith node. You are also given a 2D integer array edges where edges[i] = [ai, b..
Algorithm/Graph(DFS, BFS and so on)_Tree
2023. 1. 15. 19:43