1.
Introduction
2.
Problem Statement
3.
Explanation
4.
4.1.
What are the advantages of solving puzzles?
4.2.
How to solve a number sequence puzzle?
4.3.
Are puzzles asked in the interview of IT companies?
4.4.
What are the benefits of puzzle-solving?
4.5.
What are some of the most common interview questions and puzzles?
5.
Conclusion
Last Updated: Mar 27, 2024

# Measure Time by Hourglass

Divyansh Jain
0 upvote
Master Python: Predicting weather forecasts
Speaker
Ashwin Goyal
Product Manager @

## Introduction

Puzzles are a great way to develop logical thinking and cognitive thinking ability. Numerous interviews for popular companies feature a few puzzle-based questions. In this article, we discuss the problem of Measuring TIme by Hourglass

## Problem Statement

Question:

What time(in minutes) can be measured while using a 4-minute hourglass and a 7-minute hourglass, with the procedure taking no longer than the time we're trying to measure?

NOTE: This is a question with multiple options. Examine all of the options that can be measured.

Choose all the correct options from the following choices:

1. 11 minutes
2. 8 minutes
3. 6 minutes
4. 9 minutes
Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

## Explanation

For 11 minutes

• To count 11 minutes is also pretty easy to execute.
• At 0 minutes: Firstly, we will run the 7-minute hourglass.
• At 7 minutes: Now, we will allow the 4-minute hourglass to run out, and thatâ€™s it.

For 8 minutes

• To count 8 minutes using a 7-minute hourglass and a 4-minute hourglass is pretty easy. We donâ€™t need a 7-minute hourglass for this.
• So, we will just put the 7-minute hourglass inverted, it wonâ€™t bother us.
• At 0 minutes: We will let the 4-minute hourglass run out completely.
• At 4 minutes: let the 4-minute hourglass run out completely again and thus simply it will lead us to 8 minutes.

For 6 minutes

• No matter how many permutations we apply, it is not possible to compute 6-minute with the given two hourglasses and conditions applied.

For 9 minutes

• Here, it is pretty tricky to count 9 minutes, but itâ€™s definitely possible. So, here we go.
• At 0 minutes: Here, both hourglasses should be started at the same time.
• At 4 minutes: At this moment, the 4 minutes hourglass runs out, and flip it. Now, Only 3 minutes remaining in the 7-minute hourglass.
• At 7 minutes: There is 1 minute remaining in the 4-minute hourglass.
• And, the 7-minute hourglass runs empty, so we will flip it.
• At 8 minutes: The 4-minute hourglass runs out empty and the 7-minute hourglass is loaded with 6 minutes and 1 minute on the other side. With 1 minute left in the glass, flip it.
• At 9 minutes: And finally, the 7-minute hourglass runs empty from the above side and we calculated the 9-minute frame.

### What are the advantages of solving puzzles?

Solving puzzles enhances the problem-solving skills of a person. It also improves the logic building of a person.

### How to solve a number sequence puzzle?

To solve a number sequence puzzle, first, find the pattern between numbers of the sequence. Once you know the pattern then you can find the next number of the sequence by following the same pattern.

### Are puzzles asked in the interview of IT companies?

Many tech giants like Google, Microsoft, etc., ask the puzzles in the interview process as they want to check your logical thinking.

### What are the benefits of puzzle-solving?

People's problem-solving skills improve when they solve puzzles. It also helps a person's logic.

### What are some of the most common interview questions and puzzles?

The following are some of the most common interview puzzles:
â†’ The Man in the Elevator Puzzle
â†’ Gold Bar Cut Puzzle
â†’ Horses on a Race Track Puzzle
â†’ Tomato Soup Puzzle
â†’ Bag of Coins Puzzle

## Conclusion

To summarize the article, we have talked about a very interesting puzzle including hourglasses calculations and permutations to reach the resulted output. Also, we have discussed some frequent doubts regarding the subject.