Some codes of the book, Algorithms Fourth Edition by Sedgewick & Wayne