Math Puzzles

100 Doors Puzzle

100 doors toggle puzzle

Puzzle: : You have 100 doors in a row that are all initially closed. you make 100 passes by the doors starting with the first door every time. the first time through you visit every door and toggle the door (if the door is closed, you open it, if its open, you close it). the Read More →

Boys and Girls

boys girls google interview puzzle

Question: In a country where everyone wants a boy, each family continues having babies till they have a boy. After some time, what is the proportion of boys to girls in the country? (Assuming probability of having a boy or a girl is the same) Answer: “very simple”. Half the couples have boys first, and Read More →

Ant and Triangle Problem

Ants and triangle puzzle

Puzzle: Three ants are sitting at the three corners of an equilateral triangle. Each ant starts randomly picks a direction and starts to move along the edge of the triangle. What is the probability that none of the ants collide? Puzzle Solution: So let’s think this through. The ants can only avoid a collision if Read More →