my solution for challenges mention in "Programming Challenge" book written by Skiena