From cad19078c5c7d0de755eb8cd0231f84fff572f1a Mon Sep 17 00:00:00 2001 From: LiiNi-coder <97495437+LiiNi-coder@users.noreply.github.com> Date: Mon, 15 Dec 2025 23:35:35 +0900 Subject: [PATCH] =?UTF-8?q?[20251215]=20PGM=20/=20LV2=20/=20=EB=AA=A8?= =?UTF-8?q?=EC=9D=8C=EC=82=AC=EC=A0=84=20/=20=EC=9D=B4=EC=9D=B8=ED=9D=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...50\354\235\214\354\202\254\354\240\204.md" | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 "LiiNi-coder/202512/15 PGM \353\252\250\354\235\214\354\202\254\354\240\204.md" diff --git "a/LiiNi-coder/202512/15 PGM \353\252\250\354\235\214\354\202\254\354\240\204.md" "b/LiiNi-coder/202512/15 PGM \353\252\250\354\235\214\354\202\254\354\240\204.md" new file mode 100644 index 00000000..95ce627b --- /dev/null +++ "b/LiiNi-coder/202512/15 PGM \353\252\250\354\235\214\354\202\254\354\240\204.md" @@ -0,0 +1,34 @@ +```java +import java.util.*; + +class Solution { + private static final char[] VOWELS = {'A','E','I','O','U'}; + private static List dict; + + public int solution(String word) { + dict = new ArrayList<>(); + dfs(""); + + for(int i = 0; i < dict.size(); i++){ + if(dict.get(i).equals(word)){ + return i + 1; + } + } + return 0; + } + + private void dfs(String cur){ + if(cur.length() > 0){ + dict.add(cur); + } + if(cur.length() == 5){ + return; + } + + for(int i = 0; i < 5; i++){ + dfs(cur + VOWELS[i]); + } + } +} + +```