I read the solution for the question how to check if linked list is circular.
for: a->b->c->a : TRUE
for: a->b->c->null : FALSE
The solution uses faster and slower pointers. The faster jumps 2 cells each time and the slower goes one cell at a time. If the faster pointer reach NULL then it's false, if the slower meets the faster then its true.
What i don't understand is who grantee that both pointers will meet? if the list is of 10 millions cells, how can you be sure they will meet? what if both passing through endlessly on the list and never meet?
I know that this solution is correct but everywhere i looked there is only explanation what the code does or examples.. nowhere i could find a proof that this actually works in every case.