refactor code of LinkListCycle.java