Untitled

Anonymous
plain_text
06/27/2024 11:50 AM
408 B
21
Indexable
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];
    }
};
Editor is loading...
Leave a Comment