a****n 发帖数: 1887 | 1 for single linkedlist, u don't need that number.
1.
get nodes number in cycle = N
2.
for (fastptr = givennode; fastptr < N; fastptr=fastptr->next)
printnode(fastptr);
3.
slowptr = givennode;
do{
printnode(fastptr)
}while (++fastptr != ++slowptr);
cycle? |
|