mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-25 12:14:26 +08:00
9 lines
164 B
Go
9 lines
164 B
Go
package leetcode
|
|
|
|
func findCenter(edges [][]int) int {
|
|
if edges[0][0] == edges[1][0] || edges[0][0] == edges[1][1] {
|
|
return edges[0][0]
|
|
}
|
|
return edges[0][1]
|
|
}
|