Click here to see the full article post
It would be easier to understand if you just use h as a, C - h as b, thus F = C - h.
Pointer 2 starting at intersection ends up at the entrance when slides F steps because h + F = h + C - h = C
I don't think this solution is faithfulness enough. The F should be equals to nC+b, (n>=0)rather than b, since F may be very large, but b may be very small.
But the method still works well.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.