Boy and Girl Birth Rate Interview Question

I came across an interview question which is pretty interesting and a bit of a head fake (in my opinion). The question is...
"In a country in which people only want boys, every family continues to have children until they have a boy. if they have a girl, they have another child. if they have a boy, they stop. what is the proportion of boys to girls in the country?" --courtesy of fog creek software forums
After thinking about it for a little while I though I had the answer, but of course I was wrong. After reading the right answer I still couldn't quite convince myself that it was true, so I figured I'd test it out.

Sure enough the answer generated matches up with the explanation provided in the link above. So there you have it...


Post a Comment