Implement both stages over Text. Use supplied unicode_casefold and unicode_isalpha, retain only alphabetic folded code points, return positive requested-minus-loaded deficits in std::map<char32_t,Int>. Do not normalize further. Empty strings are valid. Prototype rescans each requested letter; final builds counts. Unicode behavior uses the bundled table version; this deliberately pins Unicode instead of depending on the host locale.

Public signatures:

cpp

std::map<char32_t,Int> prototype(const Text& loaded,const Text& requested);
std::map<char32_t,Int> solve(const Text& loaded,const Text& requested);

Compile and run from this directory:

Shell
c++ -std=c++20 -O2 -Wall -Wextra -pedantic -pthread main.cpp -o practice
./practice --stage prototype
./practice --stage final

Edit exercise.hpp. Both stages start unfinished and must report failures until implemented. Keep main.cpp as the executable contract. The runner returns nonzero for a failed check, an unexpected exception, an invalid stage, or an empty suite. C++20 and only the standard library are required.

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.

C++ runtime powered by Wasmer.