题目描述:
1791. 找出星型图的中心节点 - 力扣(LeetCode) (leetcode-cn.com)
Java代码:
class Solution {
public int findCenter(int[][] a) {
return a[0][0]==a[1][0]||a[0][0]==a[1][1]?a[0][0]:a[0][1];
}
}

题目描述:
1791. 找出星型图的中心节点 - 力扣(LeetCode) (leetcode-cn.com)
Java代码:
class Solution {
public int findCenter(int[][] a) {
return a[0][0]==a[1][0]||a[0][0]==a[1][1]?a[0][0]:a[0][1];
}
}