brutforce solution with Sets
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python []\nclass Solution(object):\n    def minimumTeachings(self, n, languages, friendships):\n        """\n        :type n: int\n        :type languages: List[List[int]]\n        :type friendships: List[List[int]]\n        :rtype: int\n        """\n        #initialize the minimum to teach to the number of users\n        min_to_teach = len(languages)\n        \n        #initialize a list of languages set for all the users \n        languages_set_list = [set(l) for l in languages]\n        \n        \n        # loop over all languages\n        for current_language in range(1, n+1):\n            to_teach = set()\n            for couples in friendships:\n                f1, f2 = couples\n                # check if the users in the couple have already a common language\n                if len(languages_set_list[f1-1].intersection(languages_set_list[f2-1]))>=1:\n                    continue\n                #if they dont and dont know the current language I add them to the set\n                else:\n                    if current_language not in languages[f1-1]:\n                        to_teach.add(f1)\n                    if current_language not in languages[f2-1]:\n                        to_teach.add(f2)\n            #at the end I check how many users were added\n            nb_of_friends_to_teach = len(to_teach)\n            #update if the new ne number of users to tech is lower than the current min \n            min_to_teach = min(nb_of_friends_to_teach, min_to_teach)\n\n        return min_to_teach\n        \n            \n\n\n        \n```
['Python']