diff --git "a/LiiNi-coder/202511/01 PGM \352\265\254\353\252\205\353\263\264\355\212\270.md" "b/LiiNi-coder/202511/01 PGM \352\265\254\353\252\205\353\263\264\355\212\270.md" new file mode 100644 index 00000000..418d6e08 --- /dev/null +++ "b/LiiNi-coder/202511/01 PGM \352\265\254\353\252\205\353\263\264\355\212\270.md" @@ -0,0 +1,23 @@ +```java +import java.util.*; + +class Solution { + public int solution(int[] people, int limit) { + Arrays.sort(people); + int left = 0; + int right = people.length - 1; + int answer = 0; + while(left <= right){ + if(people[left] + people[right] <= limit){ + left++; + right--; + } else { + right--; + } + answer++; + } + return answer; + } +} + +```