Easy JAVA Solution using Sets and BFS
Code

# Code
```java []
class Solution {
    public int numberOfComponents(int[][] properties, int k) {
        int n=properties.length;
        List<List<Integer>> adj=new ArrayList<>();
        for(int i=0;i<=n;i++) adj.add(new ArrayList<Integer>());
        HashMap<Integer,HashSet<Integer>> map=new HashMap<>();
        for(int i=0;i<properties.length;i++){
            HashSet<Integer> h=new HashSet<>();
            for(int j:properties[i]) h.add(j);
            map.put(i,h);
        }
        for(int i=0;i<properties.length;i++){
            HashSet<Integer> hs1=map.get(i);
            for(int j=i+1;j<properties.length;j++){
                HashSet<Integer> hs2=map.get(j);
                HashSet<Integer> in=new HashSet<>();
                for(int l:hs2){
                    if(hs1.contains(l)) in.add(l);
                }
                if(in.size()>=k){
                    adj.get(i).add(j);
                    adj.get(j).add(i);
                }
            }
        }
        int[] vis=new int[n];
        int ans=0;
        for(int i=0;i<n;i++){
            if(vis[i]==1) continue;
            ans++;
            Queue<Integer> q=new LinkedList<Integer>();
            q.offer(i);
            vis[i]=1;
            while(!q.isEmpty()){
                int curr=q.peek();
                q.remove();
                for(int j:adj.get(curr)){
                    if(vis[j]==1) continue;
                    q.offer(j);
                    vis[j]=1;
                }
            }
        }
        return ans;

    }
    
}

```
['Hash Table', 'Breadth-First Search', 'Graph', 'Java']