my implementations to algorithm design manual by steven skiena: