Use type-correct character literals

This pull request removes type truncation/conversion warnings in algorithm.cpp with `char` = `signed char`.