Python, 3 steps
First, find those who can\'t communicate with each other.\nThen, find the most popular language among them.\nThen teach that language to the minority who doesn\
First, find those who can\'t communicate with each other.\nThen, find the most popular language among them.\nThen teach that language to the minority who doesn\'t speak it: \n```\ndef minimumTeachings(self, n: int, languages: List[List[int]], friendships: List[List[int]]) -> int:\n\tlanguages = [set(l) for l in languages]\n\n\tdontspeak = set()\n\tfor u, v in friendships:\n\t\tu = u-1\n\t\tv = v-1\n\t\tif languages[u] & languages[v]: continue\n\t\tdontspeak.add(u)\n\t\tdontspeak.add(v)\n\n\tlangcount = Counter()\n\tfor f in dontspeak:\n\t\tfor l in languages[f]:\n\t\t\tlangcount[l] += 1\n\n\treturn 0 if not dontspeak else len(dontspeak) - max(list(langcount.values()))\n```
['Python', 'Python3']