Adds an implementation of Floyd's cycle-finding algorithm