algorithms.tutorialhorizon.com

Minimum Boats Required to rescue people. | Algorithms

Objective: Given N people need to be rescued by crossing the river by boat. Each boat can carry a maximum weight of given limit K. Each boat carries at most 2 people at the same time, provided the sum of the weight of those people is at most limit K. Write an algorithm to find the minimum number of boats required for N people to cross the river.