Untitled

mail@pastecode.io avatar
unknown
plain_text
23 days ago
305 B
2
Indexable
Never
class Solution {
public:
    bool check(int a , int b , int c) {
        if(a == b || a == c)return true;
        return false;
    }
    int findCenter(vector<vector<int>>& edges) {
        if(check(edges[0][0], edges[1][0], edges[1][1])) return edges[0][0];
        
        return edges[0][1];
    }
};
Leave a Comment