Kimi LeetCode LCP 21. 追逐游戏 Golang实现
LCP 21. 追逐游戏 - Golang 实现沿用上一问的核心思路(基环树 BFS 拓扑剥叶子),直接给出 Golang 实现:go
func chaseGame(edges [][]int, startA int, startB int) int {n : len(edges)// 转为 0-baseda, b : startA-1, startB-…
2026/8/24 14:18:32