People have weights. Each boat has a limit and holds at most people. Minimize boats used.
Example: people = [3,2,2,1], limit = . Boats: (1,2), (), (). Total: boats. What is the greedy pairing strategy? Constraint: and you need time using space sorting. Naive assignment without sorting can waste boat capacity and use more boats than necessary.