Python (Simple Union Find)
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```python3 []\nclass Solution:\n    def friendRequests(self, n, restrictions, requests):\n        m, dict1, result = len(requests), {}, []\n\n        def find(x):\n            if x not in dict1:\n                return x \n            else:\n                if x != dict1[x]:\n                    dict1[x] = find(dict1[x])\n                return dict1[x]\n\n        def union(x,y):\n            a, b = find(x), find(y)\n\n            if a != b:\n                dict1[b] = a \n\n        for i in range(m):\n            found_set, val = {find(requests[i][0]),find(requests[i][1])}, True\n\n            for a,b in restrictions:\n                if find(a) in found_set and find(b) in found_set:\n                    val = False \n                    break \n\n            result.append(val)\n\n            if val:\n                union(requests[i][0],requests[i][1])\n\n        return result \n```
['Python3']