package
0.0.0-20241125063422-a7e1e0bf04b0
Repository: https://github.com/blueblue0102/leetcode-go.git
Documentation: pkg.go.dev

# README

261. Graph Valid Tree

https://leetcode.com/problems/graph-valid-tree/

驗證所提供的無向圖是否為 tree

tree 的條件是沒有環,graph 中的任一點都可以是 root
且每一個 node 都必須被連結到,所以 edges 數量必定為 n-1

Takeaway

  • Graph Traversal