World Trips Puzzle-Asked in Oracle Interviews.

Question:

Consider three identical airplanes starting at the same airport. Each plane has a fuel tank that holds just enough fuel to allow the plane to travel half the distance around the world. These airplanes possess the special ability to transfer fuel between their tanks in mid-flight.
What are the maximum around the world trips that airplane1 can make?

Solution: 1 Trip

Planes 1 and 2 take off eastbound, and travel a quarter of the way around the world. At this point, both their tanks are half empty, so 2 transfers all of its fuel to plane 1 and lands. Now plane 1 has a full tank.Once plane 1 is halfway around the world, plane 3 takes off westbound and meets plane 1 when plane 1 is three quarters of the way around the world. At this point, plane 1’s tank is empty and plane 3’s is half empty. Plane 3 then transfers all its fuel to plane 1, who is thus able to finish the last quarter of the journey.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store