[프로그래머스] 모음 사전 - JAVA
·
알고리즘
풀이import java.util.ArrayList;import java.util.List;class Solution { static char[] vowels = {'A', 'E', 'I', 'O', 'U'}; static List list = new ArrayList(); public int solution(String word) { makeWords("", 0); return list.indexOf(word) + 1; } private void makeWords(String str, int depth) { if(depth > 5) { return; // 5글자 이상이면 리턴 } if(depth..