Easy Java Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\npublic class Solution {\n    public int getMaxRepetitions(String s1, int n1, String s2, int n2) {\n        char[] array1 = s1.toCharArray(), array2 = s2.toCharArray();\n        int count1 = 0, count2 = 0, i = 0, j = 0;\n        \n        while (count1 < n1) {\n            if (array1[i] == array2[j]) {\n                j++;\n                if (j == array2.length) {\n                    j = 0;\n                    count2++;\n                }\n            }\n            i++;\n            if (i == array1.length) {\n                i = 0;\n                count1++;\n            }\n        }\n        \n        return count2 / n2;\n    }\n}\n```
['Java']