Each boat carries at most 2 people with total weight <= limit. Find minimum number of boats.
Sort people. Use two pointers: pair lightest with heaviest when possible.
- Sort people array
- Use left and right pointers
- If people[left]+people[right]<=limit, pair them (left++)
- Always move right pointer left (right--)
- Count boats
- Time Complexity: O(n log n)
- Space Complexity: O(1)