realization of algorithms from the book of T. Corman "Introduction to Algorithms"