Open In App

Top 20 Puzzles Commonly Asked During SDE Interviews

Last Updated : 11 Mar, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Puzzles are one of the ways to check your problem-solving skills. These are tricky questions that let you think logically.

Top 20 Puzzles asked in SDE Interview

To answer any puzzles you have to be focused & careful with given conditions. It proves how calm you will be in the presence of pressure. That’s why we prepared the top 20 puzzles commonly asked in the top companies like Amazon, Microsoft, Adobe, etc. Solving these puzzles does not give you the enormous logical ability because we never know what will be asked in the interviews, but this Puzzle sheet will help you in the Interviews for sure.

Here you go:

  1. 3 Ants and Triangle
    There are 3 ants sitting on three corners of a triangle. All ants randomly pick a direction and start moving along the edge of the triangle. What is the probability that any two ants collide?
    Solution: https://www.geeksforgeeks.org/puzzle-21-3-ants-and-triangle/
     
  2. Heaven and Hell
    There are two gates, one to hell and the other to heaven. Two gatekeepers, one for each gate. One of them always speaks the truth and the other always lies but you don’t know which one guards which gate. You are allowed only one question and you need to find out the gate to heaven.
    What is the question? 
    Solution: https://www.geeksforgeeks.org/puzzle-heaven-hell/
     
  3. 10 Coins Puzzle
    You are blindfolded and 10 coins are placed in front of you on the table. You are allowed to touch the coins but can’t tell which way up they are by feel. You are told that there are 5 coins head up, and 5 coins tails up but not which ones are which. Can you make two piles of coins each with the same number of heads up? You can flip the coins any number of times. 
    Solution: https://www.geeksforgeeks.org/puzzle-24-10-coins-puzzle/
     
  4. Mislabeled Jars
    There are 3 jars, namely, A, B, C. All of them are mislabeled. Following are the labels of each of the jars:A: CandiesB: SweetsC: Candies and Sweets (mixed in a random proportion)You can put your hand in a jar and pick only one eatable at a time. Tell the minimum number of eatable(s) that has/have to be picked in order to label the jars correctly.
    Solution: https://www.geeksforgeeks.org/puzzle-mislabeled-jars/
     
  5. 50 red marbles and 50 blue marbles
    Give two boxes B1 and B2 one has 50 red marbles and the other has 50 blue marbles. A ball is selected randomly from any of the boxes and the task is to maximize the probability of selecting a red ball, by reshuffling marbles in both boxes.
    Solution: https://www.geeksforgeeks.org/puzzle-50-red-marbles-and-50-blue-marbles/
     
  6. Minimum cut Puzzle
    You have got someone working for you for five days and a gold bar to pay him. You must give them a piece of gold at the end of every day. What are the fewest number of cuts to the bar of gold that will allow you to pay him 1/5th each day?
    Solution: https://www.geeksforgeeks.org/puzzle-31-minimum-cut-puzzle/
     
  7. 100 Doors
    There are 100 doors in a row, all doors are initially closed. A person walks through all doors multiple times and toggle (if open then close, if close then open) them in the following way: In the first walk, the person toggles every door In the second walk, the person toggles every second door, i.e., 2nd, 4th, 6th, 8th, … In the third walk, the person toggles every third door, i.e. 3rd, 6th, 9th, … Likewise, In the 100th walk, the person toggles the 100th door. 
    Which doors are open in the end?
    Solution: https://www.geeksforgeeks.org/puzzle-16-100-doors/
     
  8. Find the fastest 3 horses
    There are 25 horses among which you need to find out the fastest 3 horses. You can conduct a race among at most 5 to find out their relative speed. At no point, you can find out the actual speed of the horse in a race. Find out the minimum no. of races that are required to get the top 3 horses. 
    Solution: https://www.geeksforgeeks.org/puzzle-9-find-the-fastest-3-horses/
     
  9. Calculate total distance traveled by the bee
    Two trains are on the same track and they are coming toward each other. The speed of the first train is 50 km/h and the speed of the second train is 70 km/h. A bee starts flying between the trains when the distance between two trains is 100 km. The bee first flies from the first train to the second train. Once it reaches the second train, it immediately flies back to the first train … and so on until trains collide. Calculate the total distance traveled by the bee. The speed of the bee is 80 km/h. 
    Solution: https://www.geeksforgeeks.org/puzzle-3-calculate-total-distance-travelled-by-bee/
     
  10. 3 cuts to cut the round cake into 8 equal pieces
    You have a birthday cake and have to cut it into 8 equal pieces by making 3 cuts only. How do you do it?
    Solution: https://www.geeksforgeeks.org/puzzle-3-cuts-cut-round-cake-8-equal-pieces/
     
  11. Find the last ball to remain after the entire process
    There are 20 red balls and 16 blue balls in a bag. Any 2 balls are removed at each step and are replaced with a new ball on the basis of the following conditions: If they are of the same color, then they are replaced by a blue ball. If they are of different colors, then they are replaced with a red ball. Find the last ball to remain after the entire process.
    Here replacement means that the new ball is inserted into the bag. Once you take out the balls, you do not put them back in the bag – so the balls keep reducing.
    Solution: https://www.geeksforgeeks.org/puzzle-find-last-ball-remain-entire-process/
     
  12. The Two Water Jug
    You are on the side of the river. You are given an m liter jug and an n liter jug where 0 < m < n. Both the jugs are initially empty. The jugs don’t have markings to allow measuring smaller quantities. You have to use the jugs to measure d liters of water where d < n. Determine the minimum no of operations to be performed to obtain d liters of water in one of the jugs. 
    The operations you can perform are: 
    Empty a Jug
    Fill a Jug
    Pour water from one jug to the other until one of the jugs is either empty or full.
    Solution: https://www.geeksforgeeks.org/two-water-jug-puzzle/
     
  13. 3 Bulbs and 3 Switches
    There is a room with a door (closed) and three light bulbs. Outside the room, there are three switches, connected to the bulbs. You may manipulate the switches as you wish, but once you open the door you can’t change them. Identify each switch with its bulb. All bulbs are in working condition.
    Solution: https://www.geeksforgeeks.org/puzzle-7-3-bulbs-and-3-switches/
     
  14. How to Measure 45 minutes using two identical wires?
    How do we measure forty-five minutes using two identical wires, each of which takes an hour to burn? We have matchsticks with us. The wires burn non-uniformly. So, for example, the two halves of wire might burn in 10 minutes and 50 minutes respectively.
    Solution: https://www.geeksforgeeks.org/puzzle-1-how-to-measure-45-minutes-using-two-identical-wires/
     
  15. Find ages of daughters
    Alok has three daughters. His friend Shyam wants to know the ages of his daughters. Alok gives him the first hint.
    1. The product of their ages is 72. 
      Shyam says this is not enough information Alok gives him a second hint.
    2. The sum of their ages is equal to my house number. 
      Shyam goes out and looks at the house number and tells “I still do not have enough information to determine the ages”. 
      Alok admits that Shyam can not guess and gives him the third hint
    3. The oldest girl likes strawberry ice cream. 
      Shyam is able to guess after the third hint.
      Solution: https://www.geeksforgeeks.org/puzzle-2-find-ages-of-daughters/
  16. 10 Balls in 5 Lines
    Given are ten balls, the task is to place these 10 balls in five lines such that each line contains exactly 4 balls.
    Solution: https://www.geeksforgeeks.org/puzzle-10-balls-in-5-lines/
     
  17. Pay an employee using a gold rod of 7 units?
    An employee works for an employer for 7 days. The employer has a gold rod of 7 units. How does the employer pay the employee, so that the number of employee’s rod units increases by one at the end of each day? The employer can make at most 2 cuts in the rod. 
    Solution: https://www.geeksforgeeks.org/puzzle-4-pay-an-employee-using-a-gold-rod-of-7-units/
     
  18. Torch and Bridge
    There are 4 people (A, B, C, and D) who want to cross a bridge at night.
    1. A takes 1 minute to cross the bridge.
    2. B takes 2 minutes to cross the bridge.
    3. C takes 5 minutes to cross the bridge.
    4. D takes 8 minutes to cross the bridge.
    5. Solution: https://www.geeksforgeeks.org/puzzle-18-torch-and-bridge/
  19. Poison and Rat
    There are 1000 wine bottles. One of the bottles contains poisoned wine. A rat dies after one hour of drinking the poisoned wine. How many minimum rats are needed to figure out which bottle contains poison in hour.  
    Solution: https://www.geeksforgeeks.org/puzzle-19-poison-and-rat/
     
  20. Camel and Banana Puzzle
    A person has 3000 bananas and a camel. The person wants to transport the maximum number of bananas to a destination which is 1000 KMs away, using only the camel as a mode of transportation. The camel cannot carry more than 1000 bananas at a time and eats a banana every km it travels. What is the maximum number of bananas that can be transferred to the destination using only camel (no other mode of transportation is allowed). 
    Solution: https://www.geeksforgeeks.org/puzzle-15-camel-and-banana-puzzle/

We would love to suggest you other puzzles as well, try to solve these when you feel bored. https://www.geeksforgeeks.org/puzzles/



Previous Article
Next Article

Similar Reads

Top 100 Puzzles Asked In Interviews
Puzzles are asked in Interviews to check our problem-solving skills. Here we are providing you with the top 100 puzzles that are asked in Interviews. The main aim of puzzles is entertainment. Puzzles can be of many types:- picture puzzles, logical puzzles, mathematical puzzles, etc. It is very helpful for the development of young minds and growth.
4 min read
Introduction to Sudoku Puzzles and How to Solve them?
What is Sudoku Puzzle?Sudoku is a logic-based number-placement puzzle that is asked in interviews these days very frequently. In this article, we are going to learn sudoku in-depth. How to Solve Sudoku Puzzle?The objective of the puzzle is to populate a 9x9 grid with numbers in such a way that each column, each row, and each of the nine 3x3 subgrid
2 min read
What are Mathematical Puzzles and How to solve them?
A mathematical puzzle is a type of problem or game that involves using mathematical concepts, logic, and reasoning to find a solution. These puzzles often require creative thinking and a deep understanding of mathematical principles to solve. They can range from simple arithmetic puzzles to complex problems that require advanced mathematical knowle
3 min read
Introduction to Crossword Puzzles and How to Solve them?
In the crossword Puzzle, there is a grid given along with Some Hint Questions, We need to find answers of those Questions and Fill in the Grid. Crossword Puzzles check the intellect, common sense, knowledge, awareness, and logic of a person about different topics related to Technology. To solve this kind of Puzzle, you must be aware of information
2 min read
What are Logical Puzzles And How to Solve them?
A Logical Puzzle is a type of intellectual challenge or problem-solving exercise that requires a person to use his brain, deductive reasoning, and logical analysis to arrive at a solution or conclusion. These puzzles often involve a set of rules or constraints that must be followed to reach the correct answer, and they can come in various forms and
4 min read
Puzzles - Direction
What is Direction? Direction is part of the reasoning in which you identify the direction of a person or an object. Direction can be defined as the direction or path that something is going or is intended to move in, as well as the axis that something is facing or pointing along. The four major directions are north, east, west, and south. There are
4 min read
Puzzles | (River Crossing, Starting Money, Earrings, Matching Pair)
Puzzle 1 : (River Crossing) Seven men and two boys need to cross a river. The one canoe is tiny and can carry either one man or two boys. How many times does the boat have to cross the river for everyone to get to the other side? SOLUTION:- The puzzle can be put into the form of a pattern. First, two boys cross. One boy returns. One man cross. Seco
2 min read
Puzzles | (Cryptanalysis, Bottles Problem, Dinner Time, Mystery)
Puzzle 1 : (Cryptanalysis) A detective who was mere days away from cracking an international oil smuggling ring has suddenly gone missing. While inspecting his last-known location, officers found a note: 710 57735 34 5508 51 7718. Currently, there are 3 suspects: Bill, John, and Todd. Can you break the detective’s code and find the criminal's name.
2 min read
Puzzles | (Age, Time and Distance, Guess the Word, Mystery)
Puzzle 1 : (Age) One Grandfather, One Father, and One Grand Son. Sum of their ages is 140 years. Grand son’s age in months is equal to Grandfathers age in years Grand son’s age in days is equal to Father’s age in weeks. Now, Find out the age of all three. Solution :- let x = grandfather's age let y =Father's age and let z = Grandson's age . Then, a
3 min read
5 Most Commonly used Software Development Methodologies
Software development is the process of creating, testing, and maintaining software products and services that meet user, customer, or stakeholder expectations. Software development methodologies are frameworks or models that guide the software development process and define the roles, responsibilities, activities, and deliverables of the software d
7 min read
Article Tags :
Practice Tags :