Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Problem Statement
3.
Solution
4.
Frequently Asked Questions
4.1.
What is a puzzle?
4.2.
What are the advantages of solving puzzles?
4.3.
How to solve a direction-based puzzle?
4.4.
If, with a full tank, each plane can travel one complete round of a world trip, how many maximum rounds can the plane1 travel?
4.5.
What’s the maximum distance covered the plane2 and plane3 in the above question?
5.
Conclusion
Last Updated: Mar 27, 2024

World Trips

Author Aditya Singh
0 upvote
Master Python: Predicting weather forecasts
Speaker
Ashwin Goyal
Product Manager @
Interview Puzzles

Introduction

Puzzles are critical thinking problems that test a person's lateral thinking and problem-solving skills, similar to brain teasers. These types of puzzle questions are commonly used by interviewers to assess a potential employee's ability to solve complex problems using strategies and higher-order thinking to determine their fit for the company. Given below is a number sequence puzzle.

Problem Statement

Consider three similar airplanes starting at the same airport. Every plane has a fuel tank that holds just enough fuel to allow the aircraft to travel half the distance around the world. These airplanes possess the unique ability to transfer energy between their tanks in mid-flight.

What is the maximum around-the-world trips that airplane1 can make?

  • Case 1: The answer is an integer. Just put the number without any decimal places if it's an integer. Suppose the answer is Infinity, write Infinity.
  • Case 2: Floating point number. Round it off to two decimal places and write it as I. xx, where “I” is the integer part of the solution, and xx are two decimal digits after rounding off.
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

Solution

We know that the earth is round in shape. All the planes are at the same airport. Let’s name them “airplane1” (Yellow), “airplane2” (Green), and “airplane3 (Blue)” respectively. See the diagram given below: 

 

illustration image

 

Firstly, airplane1 and airplane2 take off in an east-bound direction, and after traveling a quarter of the globe, both airplanes' tanks are half-empty, so airplane2 transfers all of its remaining fuel to airplane1 and lands on the ground. Now, airplane1 has a full tank once again. Once airplane1 traveled half of the world, airplane3 takes off in the west-bound direction and meets airplane1 when airplane1 has traveled three-quarters of the way around the globe. Now, at this point, airplane1's tank is empty, and airplane3's tank is half-empty. Now, airplane3 transfers all its remaining fuel to airplane1, airplane1 travels the remaining last quarter of the globe and lands on the ground.

Hence, airplane1 can travel a maximum of one round of world trips with the help of airplane2 and airplane3.

Check out this problem - 8 Queens Problem

Frequently Asked Questions

What is a puzzle?

A puzzle is a game of words, toys, questions, etc., that helps in increasing our problem-solving ability.

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 direction-based puzzle?

For solving a direction-based puzzle question, first draw the four directions north, east-west, and south. Then imagine the movements in the real world and imagine the shape of the world or globe while solving.

If, with a full tank, each plane can travel one complete round of a world trip, how many maximum rounds can the plane1 travel?

Then airplane1 can travel three complete rounds of the world trip. In this case, airplane2 and airplane3 with stay in their initial airport. When airplane1 comes, it will take airplane2 fuel, and in the next round, it will take airplane3 fuel. 

What’s the maximum distance covered the plane2 and plane3 in the above question?

Both airplane2 and airplane3 have traveled one-quarter of the world trip in the above case.

Conclusion

In this article, we discussed the interview-based puzzle. The puzzle is based on a word problem in which we find the maximum world trip done by the airplane1. With a full tank, aiplane1 can travel half of the world; following this, and with given two more airplanes, we find the maximum world trip is made by airplane1.

Logical Puzzles:


Pattern Based Puzzles:


Recommended Readings:


Do check out The Interview guide for Product Based Companies as well as some of the Popular Interview Problems from Top companies like Amazon, Adobe, Google, etc. on Coding Ninjas Studio.

Also check out some of the Guided Paths on topics such as Interview Puzzles, Data Structure and Algorithms, Competitive Programming, Operating Systems, Computer Networks, etc. as well as some Contests, Test Series, Interview Bundles, and some Interview Experiences curated by top Industry Experts only on Coding Ninjas Studio.

Happy Learning!

Previous article
Prisoners and Poison
Next article
Next Number
Live masterclass