Google interview question

Pthread, probability, regular expression