Computing the expected running time of two randomized sort algorithms for a given input array. This problem appeared in ACM ICPC 2013 PACNW regional competition.


Hundred Prisonors and a Room With a Light Switch
A hundred prisoners are given a challenge that might set them free. See if you can solve the puzzle involving a light switch and help them gain their freedom.

Interview Question: Fair and Unfair Coins and Bayes' Theorem
Interview question to infer the probability of an fair and unfair coins after a certain number of coin tosses using Bayes' theorem.

Interview Question: Fairness from Unfairness and Randomness Extraction
Interview question to use an unfair coin to simulate a fair one. The question is the same as extracting randomness from an unfair Bernoulli process. A Python implementation is given.