CodingMantra LogoCodingMantra
GalleryProductsPortfolioServicesGamesPricingContact
CodingMantra LogoCodingMantra

AI tools and software services for people building better digital experiences.

WhatsApp ChannelX / TwitterLinkedInInstagramFacebookGitHubYouTube

Company

  • Home
  • About Us
  • Services
  • Products
  • Portfolio
  • Pricing
  • Blog
  • API Docs
  • MCP Integration
  • Contact Us

Top Tools

  • All Tools
  • Image Tools
  • Video Tools
  • Brand Context
  • Digital Marketing
  • Financial Tools
  • SEO Tools

Legal

  • Privacy Policy
  • Terms & Conditions
  • Return Policy
  • Deals
  • Sitemap

© 2026 CodingMantra. All Rights Reserved.

    1. Home
    2. Games
    3. Brain Teasers & Logic Puzzles

    Brain Teasers & Logic Puzzles

    Sharpen your mind with a collection of classic measurement and constraint puzzles often used in technical interviews.

    Brain Teasers tool illustration

    The Wolf, Goat, and Cabbage

    A farmer needs to transport a wolf, a goat, and a cabbage across a river in a boat. The boat can only hold the farmer and one other item. The wolf cannot be left alone with the goat, and the goat cannot be left alone with the cabbage. How can the farmer safely get all three items across the river?

    The Bridge and Torch Problem

    Four people need to cross a rickety bridge at night. They have only one torch, which must be used for every crossing. The bridge can only support two people at a time. The four people cross at different speeds: one takes 1 minute, one takes 2 minutes, one takes 5 minutes, and the slowest takes 10 minutes. When two people cross together, they move at the speed of the slower person. What is the minimum time required for all four to cross?

    The Jealous Husbands Problem

    Three married couples must cross a river using a boat that can only hold two people at a time. The challenge is that no wife can be on a bank or in the boat with another man unless her own husband is also present. How can all six people cross the river?

    The Missionaries and Cannibals

    Three missionaries and three cannibals must cross a river. The boat can hold at most two people. The constraint is that for any bank, and in the boat, if there are missionaries present, they cannot be outnumbered by cannibals (or they will be eaten). How can everyone cross safely?

    The Hourglass Timers

    You have two hourglasses: one that measures exactly 7 minutes and another that measures exactly 11 minutes. Using only these two hourglasses, how can you measure exactly 15 minutes?

    The Rope Burn

    You are given two ropes and a lighter. Each rope takes exactly 60 minutes to burn from one end to the other, but they burn at a non-uniform rate (e.g., the first half might take 50 minutes and the second half 10 minutes). How can you measure exactly 45 minutes?

    The Heavy Pill Bottle

    You have 10 bottles of pills. Nine of the bottles contain pills weighing 10 grams each, but one bottle contains pills that are all 11 grams each. You have a digital scale that you can use only once. How can you find the bottle with the heavier pills?

    The 12 Coins Puzzle

    You have 12 identical-looking coins. One of them is counterfeit and is either slightly heavier or slightly lighter than the others. Using a simple balance scale only three times, how do you find the counterfeit coin and determine if it's heavier or lighter?

    The Two Eggs, 100 Floors Puzzle

    You are in a 100-story building and are given two identical eggs. You need to find the highest floor from which an egg can be dropped without breaking. What is the minimum number of drops you need in the worst-case scenario to guarantee you find this floor?

    The Three Light Switches

    You are in a room downstairs with three light switches, each corresponding to one of three light bulbs in a room upstairs. You can flip the switches as much as you want, but you are only allowed one trip upstairs to the room with the bulbs. How can you determine which switch controls which bulb?

    The Two Doors, Two Guards

    You are at a fork in the road. One path leads to safety, and the other to danger. There are two guards, one at each path. One guard always tells the truth, and the other always lies. You are allowed to ask only one yes/no question to one of the guards to find the safe path. What question do you ask?

    The Seven-Segment Display

    A digital seven-segment display is supposed to show the number 8, which uses all seven segments. However, one of the seven segments is broken and will not light up. What number could the display be showing?

    Knights and Knaves

    You are on an island inhabited by two types of people: Knights, who always tell the truth, and Knaves, who always lie. You meet two islanders, A and B. Islander A says, "At least one of us is a Knave." What are A and B?

    The Blue-Eyed Islanders

    A group of 100 people, all perfect logicians, are on an island. They are all blue-eyed, but no one knows their own eye color. They are forbidden from communicating about eye color. An outsider makes a public announcement: "I see at least one person with blue eyes." Knowing that everyone is a perfect logician, what happens?

    The Monty Hall Problem

    You're on a game show with three doors. Behind one is a car; behind the others, goats. You pick a door (say, Door 1). The host, who knows what's behind the doors, opens another door (say, Door 3) to reveal a goat. He then asks if you want to switch your choice to Door 2. Should you switch?

    SEND + MORE = MONEY (Cryptarithmetic)

    This is a classic cryptarithmetic puzzle. Each letter represents a unique digit from 0 to 9. The mapping must be consistent (e.g., if 'E' is 5, it's 5 everywhere). What is the solution to the equation SEND + MORE = MONEY?

    Make 24

    Using the numbers 3, 3, 8, 8 and the standard arithmetic operations (+, -, ×, ÷) and parentheses, find a way to make 24.