Beginners Friendly ! Easy to Understand 
IntuitionApproachComplexity
Time complexity: O(n*m)

Space complexity: O(n*m)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity: O(n*m)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(n*m)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    int intersect(vector<int> &a,vector<int> &b){
        unordered_set<int> st(a.begin(),a.end());
        sort(b.begin(),b.end());
        int ans=0;
        for(int i=0;i<b.size();i++){
            if(i>0){
                if(b[i]==b[i-1]) continue;
            }
            if(st.find(b[i])!=st.end()){
                ans++;
            }
        }
        return ans;
    }
    void dfs(unordered_map<int,vector<int>> &adj,int u,vector<int> &visited){
        visited[u]=1;
        for(auto it:adj[u]){
            if(visited[it]==-1){
                dfs(adj,it,visited);
            }
        }
    }
    int numberOfComponents(vector<vector<int>>& properties, int k) {
       int n= properties.size();
       unordered_map<int,vector<int>> adj;
       for(int i=0;i<n;i++){
           for(int j=i+1;j<n;j++){
               if(intersect(properties[i],properties[j])>=k){
                   adj[i].push_back(j);
                   adj[j].push_back(i);
               }
           }
       }
        vector<int> visited(n,-1);
        int ans=0;
        for(int i=0;i<n;i++){
            if(visited[i]==-1){
                dfs(adj,i,visited);
                ans++;
            }
        }
        return ans;
    }
};
```
['Array', 'Hash Table', 'Depth-First Search', 'Graph', 'C++']