floyd's cycle detection algorithm

visit shbcf.ru