Java | ArrayList | Faster Than 100% Java Submissions
\nclass Solution {\n    public List<Integer> intersection(int[][] nums) {\n        ArrayList<Integer> list = new ArrayList<>();\n        int arr[] = new int[100
```\nclass Solution {\n    public List<Integer> intersection(int[][] nums) {\n        ArrayList<Integer> list = new ArrayList<>();\n        int arr[] = new int[1001];\n        for(int i=0;i<nums.length;i++){\n            for(int j=0;j<nums[i].length;j++)\n                arr[nums[i][j]]++;\n        }\n        int num = nums.length;\n        for(int k=1;k<arr.length;k++){\n            if(arr[k]==num)\n                list.add(k);\n        }\n        return list;\n    }\n}\n```\nKindly upvote if you like the code.
['Array', 'Counting', 'Java']