+1 (208) 254-6996 essayswallet@gmail.com

Solve this problem:

Write an algorithm for the situation below for 1 soldier. Then rewrite it for 2 soldiers.

Don't use plagiarized sources. Get Your Custom Essay on
Algorithm – 3
Just from $13/Page
Order Essay

Ferrying soldiers
A detachment of n soldiers must cross a wide and deep river with no bridge in sight. They notice two 12-year-old boys playing in a rowboat by the shore. The boat is so tiny, however, that it can only hold two boys or one soldier. How can the soldiers get across the river and leave the boys in joint possession of the boat? How many times need the boat pass from shore to shore?

Order your essay today and save 10% with the discount code ESSAYHELP