Prototype: implement prototype(String text, String pattern) returning List<Integer> with a direct baseline.
Final: implement solve(String text, String pattern) with the mechanism and bounds described above. Return all ascending match starts measured in Unicode code points, not UTF-16 char offsets. Compare exactly, preserving case and normalization form. An empty pattern matches every code-point boundary, including the end. ("ababa","aba") gives [0,2]. Both stages have the same observable contract. The prototype may use the simpler method; final must use the target data structure.
All methods are static members of Exercise.
Complete the starter code, then run the checks.
Results and errors will appear here.
Java runs on this device with CheerpJ 4.3.