목록Algorithm/Greedy (1)
5 DERECHA
✅ 881. Boats to Save People || C++ || 2 Pointers || Greedy Algorithms || Approach explanation
Intuition & Approach In this problem, they gave us two parametes which are vectory array 'the weights of persons' and an integer which is the maximum weight that boat can carry. And what we need to return is the minimum number of boats to carry every given person. So, In navie thinking, we could check all the persons in people array whether they can share their boat with anoterh person or not. H..
Algorithm/Greedy
2023. 4. 3. 13:40