881 Boats to Save People
Techniques Used
Greedy
Two Pointer
Sorting
Approach
Sort the people weights array.
Now, use the two pointer technique to navigate the elements of people weights array.
while the start is less than end index, do the following:
if adding the weight...
raahulsaxena.hashnode.dev2 min read