You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
greedy algorithm: we first sort the weight of people in natural order. What we want to do is trying the best to utilize the space of boat as much as possible, so for each iteration, we try to put people with the highest weight was a people with the lightest weight into the same boat.