Question: You have 50 red marbles, 50 blue marbles, and 2 jars. One of the jars is chosen at random and then one marble will be chosen from that jar at random. How would you maximize the chance of drawing a red marble? What is the probability of doing so? All 100 marbles should be … Continue reading Red and Blue Marbles
Question: How would you cut a rectangular cake into two equal pieces when a rectangular piece has already been cut out of it? The cut piece can be of any size and orientation. You are only allowed to make one straight cut. . . C A P T A I N I N T E … Continue reading Piece of Cake
Question: How would you find the first common ancestor of two nodes in a binary search tree? First as in the lowest in the tree. Another way to ask is to find the lowest common ancestor of two nodes. . . C A P T A I N I N T E R V … Continue reading First Common Ancestor
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) . . C A P T A I N I … Continue reading Boys and Girls
Question: Four people need to cross a rickety bridge at night. Unfortunately, they have only one torch and the bridge is too dangerous to cross without one. The bridge is only strong enough to support two people at a time. Not all people take the same time to cross the bridge. Times for each person: … Continue reading Four People on a Rickety Bridge
Question: You have two identical eggs. Standing in front of a 100-floor building, you wonder what is the maximum number of floors from which the egg can be dropped without breaking it. What is the minimum number of tries needed to find out the solution? . . C A P T A I N I … Continue reading How Strong is an Egg?