Easy🚩 [JAVA] ✅Self-explanatory || Sorting
\nclass Solution {\n    public int maxDivScore(int[] nums, int[] divisors) {\n        int cnt = 0, max = -1, ans = 0;\n        Arrays.sort(divisors);\n        \
```\nclass Solution {\n    public int maxDivScore(int[] nums, int[] divisors) {\n        int cnt = 0, max = -1, ans = 0;\n        Arrays.sort(divisors);\n        \n        for(int div : divisors){\n           cnt = 0;\n           for(int num : nums){\n              if(num % div == 0) cnt++;\n           }\n            if(cnt > max){\n              max = cnt;\n              ans = div;\n            }\n        }\n        if(ans != 0) return ans;\n        \n        ans = Integer.MAX_VALUE;\n        for(int div : divisors) ans = Math.min(ans, div);\n        \n        return ans;\n    }\n}\n```
['Sorting', 'Java']