Java brute force solution but accepted
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```java []\nclass Solution {\n    public int getMaxRepetitions(String s1, int n1, String s2, int n2) {\n        StringBuilder sb = new StringBuilder();\n\n        if (n1 > 100) {\n            for (int i = 0; i < n1/2; i++) {\n                sb.append(s1);\n            }\n            s1 = sb.toString();\n        } else {\n            for (int i = 0; i < n1; i++) {\n                sb.append(s1);\n            }\n            s1 = sb.toString();\n        }\n\n        int counter = 0;\n        int itr1 = 0;\n        int itr2 = 0;\n        for (itr1 = 0; itr1 < s1.length(); itr1++) {\n            if (s1.charAt(itr1) == s2.charAt(itr2)) {\n                itr2++;\n            }\n            if (itr2 == s2.length()) {\n                counter++;\n                itr2 = 0;\n            }\n        }\n\n        return n1 > 100 ? (counter * 2)/n2 : counter/n2;\n    }\n}\n```
['Java']