Boats to Save People
Try to solve the Boats to Save People challenge.
We'll cover the following...
Statement
A big ship with numerous passengers is sinking, and there is a need to evacuate these people with the minimum number of life-saving boats. Each boat can carry, at most, two persons however, the weight of the people cannot exceed the carrying weight limit of the boat.
We are given an array, people
, where people[i]
is the weight of the ...
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy