Graph thought disappointed a lot!
The code has good naming of variables to understand please check it out!!\nDisappointed with the problem a lot ! \n\n\nclass Solution {\npublic:\n    int minimu
The code has good naming of variables to understand please check it out!!\nDisappointed with the problem a lot ! \n```\n\nclass Solution {\npublic:\n    int minimumTeachings(int n, vector<vector<int>>& languages, vector<vector<int>>& friendships) {\n        set<int>peopleNotCommunicate;\n        \n        for(auto ele:friendships){\n            int s=ele[0]-1;\n            int d=ele[1]-1;\n            map<int,int>lang;\n            for(auto every:languages[s]){\n                lang[every]=1;\n            }\n            \n            bool flag=false;\n            for(auto every:languages[d]){\n                if(lang[every]==1){\n                    flag=true;\n                    break;\n                }\n            }\n            \n            if(!flag){\n                peopleNotCommunicate.insert(s);\n                peopleNotCommunicate.insert(d);\n            }\n            \n            \n        }\n        \n        map<int,int>mostPopularLanguage;\n        \n        for(auto ele:peopleNotCommunicate){\n            for(auto every:languages[ele]){\n                mostPopularLanguage[every]++;\n            }\n        }\n        \n        int mini=0;\n        \n        for(auto ele:mostPopularLanguage){\n            mini=max(mini,ele.second);\n        }\n        \n        \n        return peopleNotCommunicate.size()-mini;\n        \n        \n    }\n};\n\n```
['C', 'Ordered Set']