Search⌘ K
AI Features

Boats to Save People

Explore solving the problem of evacuating people with a limited weight capacity per boat. Learn to apply greedy algorithms and two-pointer methods to minimize the number of boats required while respecting weight constraints.

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 ...