Brute force to make edges and then graph visit
Intuition
brute force to check number of common numbers between two properties to make an edge if >= k. This takes < 100*100*100 steps.
graph visited on the adj
# Intuition
 - brute force to check number of common numbers between two properties to make an edge if `>= k`. This takes `< 100*100*100` steps.
 - graph visited on the adjacent list.
 - use `vector` instead of `unordered_map/set` as size is only `< 100`

# Code
```cpp []
class Solution {
public:
    int numberOfComponents(vector<vector<int>>& properties, int k) {
        int n = properties.size();
        int m = properties[0].size();
        vector<vector<bool>> nums(n, vector<bool>(101,false));
        for(int i = 0; i < n; ++i) {
            for(auto p : properties[i]) {
                nums[i][p] = true;
            }
        }
        vector<vector<int>> adj(n);
        for(int i = 0; i < n; ++i) {
            for(int j = i+1; j < n; ++j) {
                int common = 0;
                for(int k = 0; k <= 100; ++k) {
                    if(nums[i][k] && nums[j][k]) {
                        ++common;
                    }
                }
                if(common >= k) {
                    adj[i].push_back(j);
                    adj[j].push_back(i);
                }
            }
        }
        vector<bool> visited(n, false);
        function<void(int)> dfs;
        dfs = [&dfs, &visited, &adj](int i) {
            visited[i] = true;
            for(auto j : adj[i]) {
                if(!visited[j])
                    dfs(j);
            }
        };
        int count = 0;
        for(int i = 0; i < n; ++i) {
            if(!visited[i]) {
                dfs(i);
                count++;
            }
        }
        return count;
    }
};
```
['C++']