Search⌘ K
AI Features

Boats to Save People

Understand how to solve the problem of evacuating people with a limited boat capacity using greedy algorithms. This lesson helps you apply optimization techniques to minimize boats based on weight constraints, preparing you for similar coding interview questions.

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