Pocket Gems interview question

Brain teaser on probability