Brain Teasers/Desert Crossing Problem

From Software Engineers Wiki
Jump to: navigation, search

An unlimited supply of gasoline is available at the edge of a desert 800 miles wide, but there is no gasoline in the desert. A truck can carry enough gasoline to go 500 miles (this amount will be called one load), and it can build up its own refueling stations at any point along the way. These caches can be any size and it is given that there will be no evaporation loss.

What is the minimum amount (in loads) of gasoline the truck will require in order to cross the desert? Is there a limit to the size of a desert the truck can cross?


Personal tools