BEATS 100% VERY EASY SOLUTION IN C++
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

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

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

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

# Code
```cpp []
class Solution {
public:
int intersect(vector<int>a ,vector<int>b)
{
    vector<int>hash1(101 , 0);
    vector<int>hash2(101 , 0);

    for(auto x: a)
    {
        if(!hash1[x]) hash1[x] = 1;
    }
    for(auto x: b)
    {
        if(!hash2[x]) hash2[x] = 1;
    }

    int ans = 0;

    for(int i = 0; i<= 100; i++)
    {
        ans += hash1[i] & hash2[i];
    }
    return ans;

}

void dfs(vector<vector<int>>& adj , vector<int>&seen , int a)
{
    seen[a] = 1;

    for(auto x: adj[a])
    {
        if(!seen[x])
        {
            dfs(adj , seen , x);
        }
    }
}

    int numberOfComponents(vector<vector<int>>& properties, int k) {

        int m = properties.size();
        int n = properties[0].size();

        vector<vector<int>>graph(m);
        
        for(int i = 0; i<m; i++)
        {
            for(int j = i + 1; j<m; j++ )
            {
                if(intersect(properties[i] , properties[j]) >= k)
                {
                    graph[i].push_back(j);
                    graph[j].push_back(i);
                }
            }
        }

        

        int ans = 0;
        vector<int>seen(m , 0);
        for(int i=0; i<m; i++)
        {
            if(!seen[i])
            {
                ans++;
                dfs(graph , seen , i);
            }
        }
        return ans;
    }
};
```
['C++']