This is another program to solve a problem from the book called algorithms.Here's the problem: 4.A detachment of 25 soldiers must cross a wide deep river with no bridge in sight.They notice 2 12-year-old boys in a rowboat by the shore.The boat is 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 does the boat pass from shore to shore in your algorithm?