Prototype: implement prototype(String loaded, String requested) returning Map<String,Integer> with a direct baseline.

Final: implement solve(String loaded, String requested) with the mechanism and bounds described above. Normalize each string with toUpperCase(Locale.ROOT).toLowerCase(Locale.ROOT), then count only code points for which Character.isLetter is true. Return positive requested-minus-loaded deficits in ascending code-point key order, with each key a one-code-point String. This explicit Java normalization folds ß to ss; it is not a universal Unicode casefold operation. Do not otherwise normalize. Empty strings are valid. ("ab","aaa") gives {a=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.

Drag or use the arrow keys to resize. Home collapses the question; End collapses the editor. Enter or double-click resets the split.
Loading editor…
No results yet.

Complete the starter code, then run the checks.
Results and errors will appear here.

Java runs on this device with CheerpJ 4.3.