Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • DSA
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps
    • Software and Tools
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Go Premium
  • DSA Tutorial
  • Data Structures
  • Algorithms
  • Array
  • Strings
  • Linked List
  • Stack
  • Queue
  • Tree
  • Graph
  • Searching
  • Sorting
  • Recursion
  • Dynamic Programming
  • Binary Tree
  • Binary Search Tree
  • Heap
  • Hashing
  • Divide & Conquer
  • Mathematical
  • Geometric
  • Bitwise
  • Greedy
  • Backtracking
  • Branch and Bound
  • Matrix
  • Pattern Searching
  • Randomized
Open In App

Puzzle | Light all the bulbs

Last Updated : 10 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Problem Statement: Consider a circle with 2014 light bulbs and only 2 of them are on and the rest are off. Anyone can choose any of the bulbs and change the state of the neighboring bulbs. The task is to switch all the 2014 light bulbs on?

Solution: Yes, it is possible to get all the light bulbs ON.

  • Firstly label all the 2014 light bulbs from B-1 to B-2014(in sequence).
  • As the positions of the light bulbs in the ON state are not mentioned in the problem statement.
  • So, consider that those 2 bulbs are adjacent to each other and are labeled B-1 and B-2.
  • Therefore, bulbs labeled from B-3 to B-2014 are initially in the OFF state and all the bulbs in the OFF state are adjacent to each other.

Follow the steps below to solve the given problem:

  • Consider all the 2012 remaining bulbs in groups of 4.
  • In order to light up all the bulbs perform the following strategy:
    • The first group consists of bulbs B-3 to B-6.
    • Select the second bulb from the chosen group and change the state of adjacent bulbs.
    • Here, select bulb B-4 and change the state of bulbs B-3 and B-5 from the OFF state to the ON state.
    • The second step is to select a third bulb from the chosen group and change the state of its adjacent bulbs.
    • Here, select the bulb B-5 and change the state of bulbs B-4 and B-6 from OFF to ON.
  • Similarly, the above process can be repeated for a total of 503 groups(consisting of 4 light bulbs each) and all the given 2014 light bulbs can lighten up.

P

payalcs18
Improve
Article Tags :
  • Competitive Programming
  • Logical Puzzles

Similar Reads

    Puzzles
    Puzzles are commonly asked in exams and interviews to test logical and analytical thinking. Here is a list of most asked Puzzles divided into four categories as per examination pattern. 1. Analytical / Mathematical PuzzlesPuzzle TitleAsked in CompanyFind ages of daughtersGoogle, MicrosoftCalculate t
    4 min read

    Mathematical/Analytical Puzzle

    Puzzle | 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. For example, the two halves of the wire might burn in 10 minutes and 50 minutes, respectively.Puzzle 1 | (How to Measure 45 minutes using tw
    1 min read
    Puzzle | Find the ages of daughters
    Alok has three daughters. His friend Shyam wants to know the ages of his daughters. Alok gives him a first hint. 1. The product of their age 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
    4 min read
    Puzzle | Total distance travelled by bee
    Two trains are on the same track and are approaching 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 the two trains is 100 km.The bee first flies from the first train to second train.
    2 min read
    Puzzle | Monty Hall problem
    The Monty Hall problem is a surprising probability puzzle:There are 3 doors—two hide goats, and one hides a car.You pick one door (let’s call it door 2), hoping it has the car.The game show host, Monty Hall, then looks at the other two doors (1 and 3) and opens one that has a goat behind it (Say 3).
    2 min read
    Puzzle | 100 Doors
    There are 100 doors in a row, and all doors are initially closed. A person walks through all doors multiple times and toggles (if open, then close; if closed, then open) In the first walk, the person toggles (or opens) every door. In the second walk, toggles (or closes) every second door (i.e., 2nd,
    2 min read
    Puzzle | Torch and Bridge
    There are 4 people (A, B, C, and D) who want to cross a bridge at night.A, B, C and D take 1, 2, 5 and 8 minutes respectively to cross the bridge.There is only one torch with them, and the bridge cannot be crossed without the torch. There cannot be more than two people on the bridge at any time, and
    2 min read
    Puzzle - 2 Eggs and 100 Floors
    The following is a description of the instance of this famous puzzle involving 2 eggs and a building with 100 floors. Suppose that we wish to know which stories in a 100-storey building are safe to drop eggs from, and which will cause the eggs to break on landing. What strategy should be used to dro
    3 min read
    Puzzle | Maximize probability of White Ball
    You have two empty bowls and 100 balls—50 white and 50 black. Your task is to distribute all the balls between the two bowls in any way you choose. After the distribution, one bowl will be selected at random, and then one ball will be randomly drawn from that bowl. How should you distribute the ball
    2 min read
    Puzzle | Hourglasses Puzzle
    Given two hourglasses of 4 minutes and 7 minutes, the task is to measure 9 minutes. Check if you were right - full answer with solution below.Solution:1. At 0 minutes: Start both hourglasses at the same time. 2. At 4 minutes: 4 minutes hourglass runs out and flip it. 7 minutes hourglass is left with
    1 min read
    Puzzle | The Boy Preference Ratio Riddle
    In a country, every family continues to have children until they have a boy, after which they stop having more children. Assuming the probability of having a boy or a girl is equal (50%), what is the expected ratio of boys to girls in the overall population? Check if you were right - full answer wit
    1 min read
    Puzzle | Car Wheel Puzzle
    A car is equipped with 4 tyres and 1 spare tyre.Each tyre can last for a maximum of 20,000 km before it wears out.You may swap tyres with the spare as many times as you want during the journey. What is the maximum distance the car can travel before buying a new tyre?Check if you were right - full an
    2 min read
    Puzzle | Maximum Chocolates
    You have ₹15 and go to a shop where each chocolate costs ₹1. The shopkeeper also offers a deal: you can exchange 3 empty chocolate wrappers for 1 additional chocolate. So, how many chocolates can you eat at maximum? Check if you were right - full answer with solution below.Solution : With ₹15, you b
    1 min read
    Puzzle | Newspaper folded in half
    A newspaper is made of 16 large sheets of paper folded in half, giving a total of 64 pages.The first sheet contains pages 1, 2, 63, and 64.Each sheet always has 4 pages (2 on the front, 2 on the back).If we pick up the sheet that contains page number 45, what are the other three pages on the same sh
    1 min read
    Puzzle 33 | ( Rs 500 Note Puzzle )
    A Lady (L) bought an item of Rs 100 from the Shopkeeper (C). She paid him through a 500 Rs Note. Realizing that he did not have change, the shopkeeper C got change for that note from another shopkeeper (S) and paid Rs 400 to the Lady. After a few days, S realized that the note is fake, And this rail
    1 min read
    Puzzle 39 | (100 coins puzzle)
    This puzzle is similar to 10 Coins Puzzle. Question: 100 coins are lying flat on a table. 10 of them are heads up and 90 are tails up.You can't see which one is which.How can we split the coins into two piles such that there are same number of heads up in each pile? Note: It is allowed to flip the c
    1 min read
    Puzzle | Tuesday Boy Paradox
    Ankur’s elder brother got married 10 years ago. This summer, Ankur is going to meet his brother after a decade. As a token of love, he plans to buy clothes for his brother’s kids.From what is remembered, Ankur's brother has two children, and it is known that:One of the children is a boy, and that bo
    4 min read
    Puzzle | Know Average Salary without Disclosing Salaries
    Three Employees want to know the average of their salaries. They are not allowed to share their individual salaries.Check if you were right - full answer with solution below.Solution : Follow the steps belowStep 1: X adds a Random Number and his salary and tells the sum to Y. Step 2: Y also adds a R
    1 min read
    Puzzle | Maximum run in cricket
    In a one-day international (ODI) cricket match, assuming no extras (no wides, no no-balls, no overthrows) and considering a realistic but ideal scenario, what is the maximum number of runs a batsman can score?Note: Assuming a 50-over match with 300 legal deliveries, no extras or overthrows, and a ma
    1 min read
    Puzzle | Completion of Task
    A man is assigned a task and doubles the amount of work he does each day. If he completes the entire task in 18 days, how many days does it take him to complete 25% of the task?Check if you were right - full answer with solution below.Solution: Let the man do x units of work on Day 1. Since the work
    2 min read
    Puzzle 40 | (Find missing Row in Excel)
    We are given an excel sheet which contains integers from 1 to 50, including both. However, the numbers are in a jumbled form and there is 1 integer missing. You have to write a code to identify the missing integer. Only the logic is required. Solution: We know that the sum of all the numbers from 1
    1 min read
    Puzzle | Four People on a Rickety Bridge
    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 a torch. The bridge can support only two people at a time. Not all people take the same time to cross the bridge. The crossing times for each person are:Pers
    2 min read
    Puzzle | Man fell in well
    A man fell into a 50m deep well. He climbs 4 meters up and slips 3 meters down in one day. How many days would it take for him to come out of the well?Check if you were right - full answer with solution below.Solution:On the first day, the man climbs 4 meters up and slips 3 meters down; therefore, h
    1 min read
    Puzzle | 50 red marbles and 50 blue marbles
    There are two boxes, B1 and B2. One of the boxes contains 50 red marbles, and the other contains 50 blue marbles. You are allowed to redistribute the marbles between the two boxes in any way you like, without changing the total number of red and blue marbles (i.e., 50 red and 50 blue marbles in tota
    2 min read
    Puzzle | Bag of Coins
    Ishita has 10 bags full of coins. Each bag contains 1000 coins. But one bag is full of forgeries, and she just can't recall which one. She does know that genuine coins weigh 1 gram, but forgeries weigh 1.1 grams. To hide the fact that she can't recall which bag contains forgeries, she needs your hel
    2 min read
    Puzzle | Find the last ball to remain after the entire process
    Problem Statement: You have 20 Red and 16 Blue balls in a bag. You pull out 2 balls one after another. If the balls are of the same color, then you replace them with a Blue ball – but if they are of different color, you replace them with a Red ball. Once you take out the balls, you do not put them b
    3 min read
    Puzzle | Identical bottles of pills
    Given 10 identical bottles of identical pills (each bottle contains 100 pills). Out of 10 bottles, 9 have 1 gram of pills, but 1 bottle has pills of the weight of 1.1 grams. Given a measurement scale, how would you find the heavy bottle? You can use the scale only once. Check if you were right - ful
    2 min read
    Puzzle | Hungry Worm and Old Tree Riddle
    A very hungry worm reaches a tree and eats the leaves in the following sequence:DAY 1: The worm eats 1 leafDAY 2: TWICE( DAY 1)= 2 leavesDAY 3: TWICE( DAY 2)= 4 leavesDAY 4: TWICE( DAY 3)= 8 leaves and so on.....(up to 30 days)The above eating sequence continues for 30 days, and all the leaves finis
    2 min read
    Puzzle | Chain Link Puzzle
    You have 5 separate chain segments, each made up of 3 links.Breaking open a link costs $1.Closing (welding) an open link costs $3.You may only connect segments by breaking and welding links. Connect all 5 segments into one long continuous open chain (ends remain free, not joined into a loop) while s
    1 min read
    Puzzle | The Fake Note Puzzle
    A lady purchases goods worth Rs. 200 from a shop. The lady pays with a Rs. 1000 note. Since the shopkeeper doesn’t have change, he goes to a neighbouring shop, exchanges the Rs. 1000 note for smaller denominations, and returns to give the lady Rs. 800 in change, keeping Rs. 200 as payment for the go
    2 min read
    Puzzle | Snail and Wall
    A snail wishes to reach a water's shore. To do this, it must cross a wall that is 30 feet high. It has a time limit of 30 hours to reach the top of the wall. The time starts as soon as it starts climbing the wall. However, it faces a problem while climbing. Every hour, it climbs the wall 3 feet up,
    2 min read
    Puzzle 45 | Gem in Pockets
    Vijay Dinanath Chauhan aka “VDC” was travelling from Bangalore to New Delhi along with his friends. VDC was wearing a Cargo Jeans with finite number of small pockets. And in his pockets, there were packets of gems, not the real ones,actually the Cadbury gems to eat when he reaches Delhi.In each pock
    2 min read
    Puzzle | Pizza
    At a restaurant, pizzas can be ordered in boxes of 6, 9, and 20. What is the largest number of Pizzas that cannot be ordered using any combination of these boxes?For Example: Check if you were right - full answer with solution below.There exist two types of solutions for such a problem.They include
    3 min read
    Puzzle 49 | King and his Elephants
    A king dies after writing an agreement to divide the elephant power to his three sons, the first son has to get 1/2 of elephants, second son gets 3/4th of remaining elephants left after giving away to the first son, third son gets 1/2th of remaining elephants left after giving away to the second son
    1 min read
    Puzzle | Find the box which contains Box of 11 gm Cigarettes
    Suppose you have 10 boxes and each box contains 10 Cigarettes. 9 out of 10 boxes have each Cigarette of 10 gm. Remaining 1 box has each Cigarette of 11 gm. The task is to find the box which contains 11gm Cigarettes. Constraint: You have an electronic weighing machine and with the help of that you ha
    2 min read
    Puzzle | Find the Initial Money
    Rama started on a quest of visiting temples, with few coins in his pockets. As soon as he visits any temple, the money in his pocket gets doubled and on his way out, he donates Rs. 100 to each temple. He visits 4 temples on his quest. After visiting the last temple, his pocket is empty of all the mo
    2 min read
    Puzzle | Minimum planes to go around the world
    On an Island, there is an airport that has an unlimited number of identical air-planes. Each air-plane has a fuel capacity to allow it to fly exactly 1/2 way around the world, along a great circle. The planes have the ability to refuel in flight without loss of speed or spillage of fuel. Though the
    2 min read
    Puzzle | Six colored cube
    Given six distinct colors, in how many unique ways can a six faced cube be painted such that no two faces have the same color? Note: Mixing of colors is not allowed. Answer: 30 ways Explanation: To avoid repetitions, let us fix the color of the top face. Hence, the bottom face can be painted in 5 wa
    1 min read

    Logical Puzzles

    Puzzle 9 | (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 which are required to get the top 3 horses. Fin
    4 min read
    Puzzle | Finding the Injection for Anesthesia
    In a Medical Laboratory: You have 240 injections, and exactly one of them is an anesthetic. You also have 5 rats to help identify which injection is the anesthetic.How it worksIf a rat receives the anesthetic injection, it will faint sometime within 24 hours after that injection (the exact time is u
    3 min read
    Puzzle | 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 length. How does the employer pay the employee, so that the number of employees’ rod units increases by one at the end of each day? The employer can make at most 2 cuts in the rod. (Hint- after the end of the day, e
    2 min read
    Puzzle | 3 Bulbs and 3 Switches
    There is a closed room with three light bulbs inside. You have a closed room containing three light bulbs.Outside the room, there are three switches, each connected to exactly one bulb (but you don’t know the mapping).You can toggle the switches (on/off) in any way before entering the room.You may o
    2 min read
    Puzzle | 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 that is 1000 km 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 maxim
    3 min read
    Puzzle | Find the Jar with Contaminated Pills
    You have 5 jars of pills. Each pill in a jar normally weighs 10 grams, but one of the jars is contaminated, and every pill in that jar weighs 9 grams instead of 10.You are allowed to use a digital weighing scale only once.How can you determine which jar contains the contaminated pills using just one
    1 min read
    Puzzle | A Man with Medical Condition and 2 Pills
    A man has a medical condition that requires him to take two kinds of pills, call them A and B. The man must take exactly one A pill and exactly one B pill each day, or he will die. The pills are taken by first dissolving them in water. The man has a jar of A pills and a jar of B pills. One day, as h
    2 min read
    Puzzle | 100 Prisoners with Red/Black Hats
    There are 100 prisoners standing in a single line.Each prisoner is wearing a red or black hat.They can see the hats of all prisoners in front of them, but not their own hat or the hats of those behind.The questioning starts from the last prisoner in the line (who can see all 99 others) and moves for
    3 min read
    Puzzle | 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 heads up, and 5 coins tails up, but not which ones are which. Can you make two piles of coins, each with th
    1 min read
    Puzzle | Strategy for a 2 Player Coin Game
    Consider a two-player coin game where each Player A and Player B gets the turn one by one. There is a row of even number of coins, and a player on his/her turn can pick a coin from any of the two corners of the row. The player who collects coins with more value wins the game. Develop a strategy for
    5 min read
    Puzzle | 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 rats are needed to figure out which bottle contains poison in an hour? Check if you were right - full answer with solution below.Solution:To identify the poisoned
    1 min read
    Puzzle | 5 Pirates and 100 Gold Coins
    Five pirates have to divide 100 gold coins among themselves. Each pirate has a different rank based on seniority: Pirate A is the most senior, followed by B, then C, then D, and finally Pirate E, who is the most junior.Rules of distribution are: The most senior pirate proposes a distribution of coin
    2 min read
    Puzzle | Minimum cut Puzzle
    You hire a worker for 5 days and agree to pay them 1 unit of gold at the end of each day. However, you only have a single 5-unit gold bar.The conditions are:The worker must be paid exactly 1 unit per day.You are allowed to cut the gold bar into pieces.After cutting, you can use those pieces to make
    2 min read
    Puzzle | Prisoner and Policeman Puzzle
    The policeman decided to punish the Prisoner and asked him to make a statement. The Prisoner should make such a statement so that he would be alive. If the statement is held true by the Policeman, the Prisoner will be hanged to death, and If the statement is held false, the Prisoner will be shot dea
    2 min read
    Puzzle 36 | (Matchstick Puzzle)
    Question: How to make 4 equilateral triangles with 6 identical match sticks? Method - I: Make a tetrahedron. Method-II: Method - III: Make one equilateral triangle by three sticks . then put each remaining stick on straight line passing through middle points of each two arms of triangle. Method IV:
    1 min read
    Missionaries and Cannibals
    Question: In the missionaries and cannibals problem, three missionaries and three cannibals must cross a river using a boat which can carry at most two people, under the constraint that, for both banks, if there are missionaries present on the bank, they cannot be outnumbered by cannibals (if they w
    4 min read
    Puzzle | Guess Color of Hat
    There are 20 people standing in a line, one behind the other. Each is made to wear a hat, which can be either white or black. There can be any number of white or black hats between 0 and 20. Each person can see the hats of all the people ahead of him in the line, but not those of the people standing
    3 min read
    Puzzle 43 | Muddy Heads
    A mother tells her two children, a boy and a girl, to play without getting dirty. However, while playing, both children get mud on their foreheads. The mother says “At least one of you has a muddy forehead”. She then asks the children to answer “Yes” or “No” to the question: “Do you know whether you
    2 min read
    Puzzle | Heaven and Hell
    You are standing in front of two gates: 1) One gate leads to Heaven. 2) The other gate leads to Hell.There are two gatekeepers:One always tells the truth.The other always lies.You don’t know which gatekeeper guards which gate.What single question should you ask to guarantee finding the gate to Heave
    2 min read
    Puzzle | Mislabeled Jars
    Puzzle : 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
    1 min read
    Puzzle | 8 balls problem
    Puzzle: You are provided with 8 identical balls and a measuring instrument. 7 of the eight balls are equal in weight and one of the eight given balls is defective and weighs less. The task is to find the defective ball in exactly two measurements. Solution: Step 1: Divide the balls into three catego
    2 min read
    Puzzle 51| Cheryl’s Birthday Puzzle and Solution
    (Wiki) Cheryl's Birthday is the unofficial name given to a mathematics brain teaser that was asked in the Singapore and Asian Schools Math Olympiad, and was posted online on 10 April 2015 by Singapore TV presenter. It is an interesting problem and might be asked in the interviews. It is based on log
    3 min read
    Puzzle | Measure 4L using given 3 buckets
    Suppose you have 8L, 5L, and a 3L bucket with you. The buckets have no measurement lines on them, and you are asked to measure exactly 4L of water using the three buckets. How could you measure exactly 4L of water using only those buckets, and provided you have as much extra water as you need? Check
    3 min read
    Puzzle | 3 Priests and 3 devils Puzzle
    Six people — 3 Priests and 3 Devils — need to cross a river using a boat that holds at most two people.Rules:At any time (on either riverbank or in the boat), if the number of Devils exceeds the number of Priests, the Devils will eat the Priests (i.e., that situation is forbidden).The boat requires
    2 min read
    Puzzle | Farmer, Goat, Wolf and Cabbage
    There is a farmer who wishes to cross a river but he is not alone. He also has a goat, a wolf, and a cabbage along with him. There is only one boat available which can support the farmer and either of the goat, wolf or the cabbage. So at a time, the boat can have only two objects (farmer and one oth
    3 min read
    Puzzle | Water Jug Problem
    We have two water jugs, one measures 4 Gallons (4G) while the other measure 9 Gallons (9G). But there is no measuring label mentioned on either of these two jugs i.e. we cannot know the exact amount filled in the jug. Now, assuming there is an infinite amount of water supply, can we measure all 1G,
    2 min read
    Puzzle | Blind man and Pills
    A blind man is alone on a deserted island. He has two blue pills and two red pills. He must take exactly one red pill and one blue pill, or he will die. How does he do it?Check if you were right - full answer with solution below.Solution:Way 1:Firstly, break each of the pills in half, and as you do
    2 min read
    Puzzle | The Burning Candles
    Problem Statement: Given two candles. Each of them burns for one hour. They burn unevenly in different parts though. In addition, let's have a box of matches. Measure 45 minutes and 15 minutes. Solution: Step1: Both ends of the first candle should be lit, but only one end of the second candle should
    2 min read
    Puzzle | Birthday Puzzle
    On a New Year's day, two old friends (A and B) meet at a party. As they met after a long time, person B wanted person A to guess his birthday. As both friends have not been in touch for a long time, person A was unable to guess his birthday. So person B decided to give some hints. Below are the hint
    1 min read
    Puzzle | Rat and Poisonous Milk Bottles
    You are given 4 bottles of milk.Exactly 1 bottle is poisonous.The other 3 bottles are safe.You also have a rat that: Dies exactly 10 hours after drinking from the poisonous bottle.Additionally, you have a clock that measures time only in whole hours.Suggest an optimal strategy to identify the poison
    1 min read
    Puzzle | Measuring 6L water from 4L and 9L buckets
    Suppose you have a 4-litre jug and a 9-litre bucket, both without any measurement markings. How can you measure exactly 6 litres using only these two containers and an unlimited supply of water? Check if you were right - full answer with solution below.Solution: Consider two containers: a 4-litre ju
    1 min read
    Puzzle | Six Houses P, Q, R, S, T, and U
    There are three houses on each side of the road. These six houses are labeled as P, Q, R, S, T, and U. The houses are of different colors, namely, Red, Blue, Green, Orange, Yellow, and White. The houses are of different heights. T, the tallest house, is exactly opposite to the Red-colored house.The
    3 min read
    Melting Candles | Puzzle
    Problem Statement: There are two candles of equal lengths but of different thicknesses.The thicker candle lasts for 6 hours while the thinner one lasts for 2 hours lesser than the thicker one.A person lights the two candles at the same time and goes to play.After returning home, the person saw that
    3 min read
    Puzzle 47 | Red Hat vs Blue Hat
    A team of three people decide on a strategy for playing the following game. Each player walks into a room. On the way in, a fair coin is tossed for each player, deciding that player’s hat color, either red or blue. Each player can see the hat colors of the other two players, but cannot see her own h
    3 min read
    Puzzle | Find the Culprit
    Joe is a person who can't keep his secrets. He is that much careless that all his relatives and friends know his Debit Card PIN. Today Joe makes a profit of $1000. So he decided to throw a party and he invited his 3 friends: Leena, Paul, and Andrew. He was in a hurry to reach the home as soon as pos
    2 min read
    Puzzle 54 | Fill the Jug
    There are two jugs each of 4 and 3 liters respectively , without any measuring marks. how many minimum steps are required to have 2 liters of water into the 4 litre jug (the jugs can be filled any number of times with water, and they can be emptied any number of times). Note that this puzzle is diff
    2 min read
    Puzzle 46 | Rich or Poor
    A place has two kinds of residents, Poor, who always tell the truth, and their opposites, Rich, who always lie. You encounter two people A and B. What are A and B if A says “B is a Poor” and B says “The two of us are opposite types” ? Answer: Both A and B are Rich Solution: Let p and q be the statem
    2 min read
    Puzzle | Light all the bulbs
    Problem Statement: Consider a circle with 2014 light bulbs and only 2 of them are on and the rest are off. Anyone can choose any of the bulbs and change the state of the neighboring bulbs. The task is to switch all the 2014 light bulbs on?Solution: Yes, it is possible to get all the light bulbs ON.F
    2 min read
    Puzzle | Distribute the Water
    Problem Statement: Suppose there are three containers; container I (3L), container II (5L), container III (8L). Container III is filled with 8L of water while the other two are empty. With the help of these 3 containers, how to distribute the water in equal volumes i.e. 4L in container II and, 4L in
    2 min read
    Puzzle 50 | The Boat Wreckage
    Let’s make this one easy! Ankur with his friends went to river the bank of river Ganges, as the exams are over for fun and recreation. But while crossing to other side of the river, a storm came and he along with fourteen other people are trapped in a boat in the mid of the river. None of them know
    2 min read
    Puzzle | Weight of Heavy Ball
    Puzzle: There are 2187 balls, out of which 1 is heavy. Find the minimum number of attempts the balls have to be weighed for finding out the heavy ball. Solution: The minimum amount of measurements needed to be done will be equal to 7 times. 2187 = 3^7 Step 1: Divide the 2187 balls into 3 equal group
    4 min read
    Puzzle | Guess the bit string
    Puzzle: Your friend thinks of an N bit string that will refer to it as a code. The task is to guess the code by asking your friend a series of queries. In each query, you can provide your friend with an N bit string of your choice, and your friend will tell you the number of bits in your string that
    3 min read

    Arrangement Puzzles

    Puzzle 11 | ( 1000 Coins and 10 Bags )
    A dealer has 1000 coins and 10 bags. He has to divide the coins over the ten bags so that he can make any number of coins simply by handing over a few bags. How must divide his money into the ten bags? Find the ages of daughters Solution: The idea of filling coins in the powers of 2 can be get from
    2 min read
    Puzzle 23 | (Days of month using 2 dice)
    Puzzle: How can you represent days of month using two 6 sided dice? You can write one number on each face of the dice from 0 to 9 and you have to represent days from 1 to 31, for example for 1, one dice should show 0 and another should show 1, similarly for 29 one dice should show 2 and another shou
    2 min read
    Puzzle 38 | (Tic Tac Toe Puzzle)
    Statement: The game of Tic-Tac-Toe is being played between two players and it is in below state after six moves. Can you answer following questions? Who will win the game, O or X? Which was the sixth mark and at which position? Assume that both the players are intelligent enough. Solution: X will wi
    1 min read
    Puzzle 30 | (Last Palindrome Date Before 10/02/2001)
    In year 2001 on October 2, 2001, the date in MMDDYYYY format was a palindrome (same forwards as backwards), 10/02/2001 -> "10022001" When was the last palindrome date before 10/02/2001? Answer: One year can have only one palindrome as the year fixes the month and date too, so the year has to be l
    1 min read
    Puzzle 42 | (Placing the numbers)
    Place the numbers 1, 2, 3, 4, 5, 6, 7, 8 into the eight circles in figure given below, in such a way that no number is adjacent to a number that is next to it in the sequence.For example 1 should not be adjacent to 2 but can be adjacent to 3, 4, 5, 6, 7, 8. Similarly for others. We strongly recommen
    2 min read
    Puzzle | 10 Balls in 5 Lines
    Puzzle: Given are ten balls, the task is to place these 10 balls in five lines such that each line contain exactly 4 balls. Solution: The solution to the above puzzle can be obtained as: Draw the star with a pentagon in the centre. Place each ball at the intersection of extended lines of pentagon Th
    1 min read
    Puzzle | (Round table coin game)
    Suppose two player, player A and player B have the infinite number of coins. Now they are sitting near a perfectly round table and going to play a game. The game is, in each turn, a player will put one coin anywhere on the table (not on the top of coin already placed on the table, but on the surface
    1 min read
    Puzzle | Place numbers 1 to 9 in a Circle such that sum of every triplet in straight line is 15
    Place the numbers 1 to 9 in a circle, so that wherever there are three in a straight line they shall add up to 15. SOLUTION:The sum of first number and last number is ten ( 1 + 9 = 10 ).Similarly, the sum of second number and second last element is also ten ( 2 + 8 = 10 )In the same way ( 3 , 7 ) an
    2 min read

    Shape based Puzzles

    Puzzle 21 | (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 edge of the triangle. What is the probability that any two ants collide? Hint: Every ant has two choices (pick either of two edges going through the corner on which ant is initially sit
    1 min read
    Puzzle | 3 cuts to cut round cake into 8 equal pieces
    Puzzle: 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: The solution can be divided into 3 basic steps. But apart from this there are also other method of executing this task. Step 1: Cut the cake into quarters (4 pieces) using 2 of
    1 min read
    Puzzle 25 | (Chessboard and dominos)
    There is an 8 by 8 chessboard in which two diagonally opposite corners have been cut off. You are given 31 dominos, and a single domino can cover exactly two squares. Can you use the 31 dominos to cover the entire board? Answer: No Explanation: At first, it seems that there were 8*8 = 64 squares the
    1 min read
    Puzzle | Three Squares
    Given four sticks of length 'a' and four more sticks of length 'b'. The length of 'b' is exactly half of the length of 'a'. The task is to make three equal squares using the given 8 sticks. Solution: Below are the steps to make three equal squares from the given sticks: 1. Place the first stick of l
    1 min read
    Puzzle | Maximum pieces that can be cut from a Circle using 6 straight lines
    PUZZLE:Given a Circle and Six Straight Lines. What is the maximum number of pieces that one can cut the circle using these six straight lines?SOLUTION:Using six lines, we can cut the circle into 22 pieces at maximum.Using one line, the circle can be divided into two parts.Two lines divide the circle
    1 min read
    Puzzle | Splitting a Cake with a Missing Piece in two equal portion
    Problem Statement: There are three friends who ordered a rectangular cake. One of them was in a hurry so he cut a rectangular piece from the cake. The piece could be of any arbitrary size(less than the size of the cake) and rotation. Now the remaining two friends want to divide the remaining cake in
    1 min read
    Puzzle 48 | Rectangular Cardboard
    Given, a rectangular cardboard with a rectangular piece removed(of any size and orientation) how one can cut the rectangular cardboard in two equal parts with one straight line cut. Solution: Using the fact: that “any line passing through the center of a rectangle divides the rectangle into two equa
    1 min read
    Puzzle | Dividing a Square into N smaller squares
    Puzzle: Find all values of N for which one can dissect a square into N smaller squares, and outline an algorithm for doing such a dissection. Solution: The basic point to observe is a square has 4 right-angles. So, to divide it into smaller squares each of its right-angle must fall into another squa
    2 min read

    Rubik's Cube

    Algorithm to solve Rubik's Cube
    A Rubik's Cube is an interesting puzzle invented by Erno Rubik, which has 43 quintillion possible configurations. But with the use of certain algorithms, it can be solved easily. There are many variations of the Rubik's cube nowadays, but the most basic one is the 3x3x3 Rubik's cube.A 3x3x3 Rubik's
    4 min read
    Rubik's Cube Facts and Questions
    What is a Rubik's Cube?The Rubik’s Cube is a 3-D combination Puzzle that was invented in 1974 by Hungarian sculptor and professor of architecture Ernő Rubik. Rubik’s Cube is a Puzzle with a six-coloured cube, whose faces each include nine squares, eight of which can be rotated separately. In this ar
    5 min read

    Brain Teasers

    Brain Teasers
    What are Brain Teasers?Brain teasers are puzzles or problems that are designed to stimulate and challenge the brain. They often require creative thinking, problem-solving skills, and the ability to think outside the box. Brain teasers come in various forms, including riddles, puzzles, and logic game
    5 min read

    Crossword Puzzle

    Crossword Puzzle Of The Week #1 (for DSA)
    In this issue of Crossword Puzzle of the week, we will dive into the topics of Data Structures and Algorithms (DSA). The solution to the crossword puzzle is provided at the end. Crossword Puzzle #1 - by GeeksforGeeksHINTS: Down: 1. A ______ is like a line waiting to purchase tickets, where the first
    2 min read
    Crossword Puzzle Of The Week #2 (for Computer Science and Applications)
    In this issue of Crossword Puzzle of the week, we will dive into the topics of Computer Science and Applications. The solution to the crossword puzzle is provided at the end. Crossword Puzzle Of The Week #2 (for Computer Science and Applications) HINTS: ACROSS:1. The ........ number system consists
    2 min read
    Crossword Puzzle Of The Week #3 (for Database and Queries)
    In this issue of Crossword Puzzle of the week, we will dive into the topics of Database and Queries. The solution to the crossword puzzle is provided at the end. Crossword Puzzle Of The Week #3 (for Databases and Queries)HINTS: DOWN: 1. _______ gives a logical structure of the database graphically?2
    1 min read
    Crossword Puzzle Of The Week #4 (for Object Oriented Programming)
    In this issue of Crossword Puzzle of the week, we will dive into the topics of Object Oriented Programming. The solution to the crossword puzzle is provided at the end. Crossword Puzzle Of The Week #2 (for Object-Oriented Programming)HINTS: DOWN 1. The class members declared as _____ can be accessed
    2 min read
    Crossword Puzzle Of The Week #5 (for Operating System)
    In this issue of Crossword Puzzle of the week, we will dive into the topics of Operating Systems. The solution to the crossword puzzle is provided at the end. Crossword Puzzle Of The Week #5 (for Concepts of Operating System)HINTS: DOWN 1. Part of the operating system which is responsible for file m
    2 min read
    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 helpf
    5 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Campus Training Program
  • Explore
  • POTD
  • Job-A-Thon
  • Community
  • Videos
  • Blogs
  • Nation Skill Up
  • Tutorials
  • Programming Languages
  • DSA
  • Web Technology
  • AI, ML & Data Science
  • DevOps
  • CS Core Subjects
  • Interview Preparation
  • GATE
  • Software and Tools
  • Courses
  • IBM Certification
  • DSA and Placements
  • Web Development
  • Programming Languages
  • DevOps & Cloud
  • GATE
  • Trending Technologies
  • Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
  • Preparation Corner
  • Aptitude
  • Puzzles
  • GfG 160
  • DSA 360
  • System Design
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences