diff --git "a/lkhyun/202512/13 PGM Lv2 \352\265\254\353\252\205\353\263\264\355\212\270.md" "b/lkhyun/202512/13 PGM Lv2 \352\265\254\353\252\205\353\263\264\355\212\270.md" new file mode 100644 index 00000000..312ae9cb --- /dev/null +++ "b/lkhyun/202512/13 PGM Lv2 \352\265\254\353\252\205\353\263\264\355\212\270.md" @@ -0,0 +1,20 @@ +```java +import java.util.*; +class Solution { + public int solution(int[] people, int limit) { + int answer = 0; + Arrays.sort(people); + int left = 0; + int right = people.length-1; + + while(left <= right){ + int rest = limit - people[right--]; + answer++; + if(rest >= people[left]){ + left++; + } + } + return answer; + } +} +```