You trade apples from a village to your town. The distance is 1000 miles. This time you were able to get your hands on 3000 apples. You have a truck that can carry just 1000 apples at one time. At every mile is located a check post at which you have to submit 1 apple while going to the town. However, when you travel from town to village, you don’t have to give anything.
How will you make sure that you are able to transport maximum amount of apples to the town?
Solution:
Step one: First you will have to make 3 trips of 1,000 apples 333 miles. Then you will be left with 2,001 apples and 667 miles to go.
Step two: Next you will have to take 2 trips of 1,000 apples 500 miles. In this manner you will be left with 1,000 apples and 167 miles to go (you have to leave an apple behind).
Step three: At last, you will have to travel the last 167 miles with one load of 1,000 apples and you will be left with 833 apples when you reach the town