Search⌘ K
AI Features

Boats to Save People

Understand how to solve evacuation problems by applying greedy algorithms to minimize boats while respecting weight limits. This lesson helps you develop problem-solving skills relevant to coding interviews by practicing two-pointer techniques and optimization strategies in a hands-on coding environment.

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