diff --git "a/LiiNi-coder/202512/14 PGM \354\240\204\355\231\224\353\262\210\355\230\270 \353\252\251\353\241\235.md" "b/LiiNi-coder/202512/14 PGM \354\240\204\355\231\224\353\262\210\355\230\270 \353\252\251\353\241\235.md" new file mode 100644 index 00000000..a2d95471 --- /dev/null +++ "b/LiiNi-coder/202512/14 PGM \354\240\204\355\231\224\353\262\210\355\230\270 \353\252\251\353\241\235.md" @@ -0,0 +1,19 @@ +```java +import java.util.*; + +class Solution { + public boolean solution(String[] phone_book) { + + Arrays.sort(phone_book); + for(int i = 0; i < phone_book.length - 1; i++){ + String now = phone_book[i]; + String next = phone_book[i + 1]; + if(next.startsWith(now)){ + return false; + } + } + return true; + } +} + +```