## Floyd's cycle-finding algorithm

A well-known interview question: How to determine if a linked-list has a loop? The answer is to have two pointers scanning the linked-list. If the linked-list doesn’t contain any loop, we should be able to find the end of the linked-list. If the linked-list does contain a loop, then with... [more]

## Game of Probability

In a game, two players, $$A$$ and $$B$$, performing Bernoulli trials $$t_A$$ and $$t_B$$ alternately, with occurance probabilities $$p_A$$ and $$p_B$$ respectively. Player $$A$$ make his turn first. The game ends whenever a player succeed in his trial but continues if neither wins. [more]