# Logic Interview Questions

interview questions shared by candidates

## Logic Interview Questions

If you get a 20% raise after your first year and now make $80K, how much did you make your first year? |

You have three barrels. One barrel is filled with apples, one with oranges, and one with both apples and oranges. Each barrel is mislabeled. You can take out as many fruit as you like form each barrel and look at it. What is the minimum number of fruits you need to remove to correctly label the barrels? |

You have 25 horses, and you want to know which are the top 3 fastest, but you don't have a stopwatch. You can race the horses, but the track is only big enough to fit 5 horses at a time. How do you find the first, second and third fastest horses using the least amount of races possible? |

There are 10 stacks of 10 coins each. 9 of the stacks contain coins that weigh 1g each. The other stack contains coins of 2g each. The coins look the same. We have a scale that we can get a measurement of grams from, not a balance. We can use the scale exactly once to weigh anything here from a single coin to all of them. How can we determine which stack is the 2g coins? |

I had not expected to be asked logic questions, which made me nervous. The first one was a weigh nine items on a balancing scale to find the odd one out in the fewest scale uses |

How much water is on the planet (earth)? |

Given a series of strings, find the biggest common prefix. |

If you have three people standing, all facing the same direction, each person can see the color of the hat of only the person directly in front of them (which can be either black or white). There are two hats of each color (four total). The hats are placed on the persons' heads one at a time, starting with the one in the very front. When someone knows for certain what color hat they have, they need to declare that they have discovered the color of their hat. In this scenario, no matter which hats are distributed, at least one person can be certain of their hat color. What are these scenarios, and what are the probability distributions for each? |

Scenario: If you were running late for a job interview and you had no lights on in your apartment. Let's say you went into your dresser drawer and had to pull out one pair of socks. All you had was black or brown socks. And there were 5 socks total, what is the least amount of pulls you could do? |

You’re in a room with three light switches, each of which controls one of three light bulbs in the next room. Your task is to determine which switch controls which bulb. All lights are initially off, and you can't see into one room from the other. You may inspect the room only once. How can you determine which switch is connected to which light bulb? |

**11**–

**20**of

**87**Interview Questions