+ 4
*Coding Challenge* -- #Men Crossing River#
Write a program in any language to find the all possible ways (if possible) for a group of people to cross the road . For example , you need to get the user input as times in seconds for every person that will cross the road and then find the possible way to solve it . NOTE : At most 2 people can come on the boat at a time , an empty boat can't cross the river . The time for a boat to cross the road by 2 people will be equal to time taken by the person who crosses it at higher time .
2 Réponses
+ 7
If I've got your challenge correctly😅
https://code.sololearn.com/c3lJvGq6e2mD/?ref=app
+ 2
The user should also give the time under which the whole process of crossing the river should be done .
Sample input
1 2 4 6 14
.........Output...........
A-D A A-C A A-B
*Considering the person as A , B , C , D ,....
Respectively .