EasyApproach || Java
Intuition\n Describe your first thoughts on how to solve this problem. \n\n\n# Approach\n Describe your approach to solving the problem. \nWe initialize maxScor
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nWe initialize maxScore to -1 and maxDivisor to Integer.MAX_VALUE.\n\n Then, we loop through all the divisors in the array divisors. \n\nFor each divisor, we count the number of elements in the array nums that are divisible by that divisor. \n\nIf this count is greater than the current maximum score, we update maxScore and maxDivisor to the current divisor. \n\nIf the score is equal to the current maximum score, we update maxDivisor only if the current divisor is smaller than the current maximum divisor.\n\nFinally, we return maxDivisor as the integer with the maximum divisibility score.\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO (nxn)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO (1)\n\n# Code\n```\nclass Solution {\n    public int maxDivScore(int[] nums, int[] divisors) {\n    int maxScore = -1;\n    int maxDivisor = Integer.MAX_VALUE;\n\n    for (int divisor : divisors) {\n        int score = 0;\n        for (int num : nums) {\n            if (num % divisor == 0) {\n                score++;\n            }\n        }\n        if (score > maxScore || (score == maxScore && divisor < maxDivisor)) {\n            maxScore = score;\n            maxDivisor = divisor;\n        }\n    }\n\n    return maxDivisor;\n}\n}\n```
['Java']