완전탐색
[프로그래머스] Lv.2 모음사전 (완전탐색)
모음사전 최대 시간복잡도: O(n^5) 5 + 5*5 + 5*5*5 + 5*5*5*5 + 5*5*5*5*5 = 3905 최대 시간복잡도는 n^5 이지만, 워낙 최대 횟수가 적어서 완전탐색으로 빠르게 풀기로 했다. 풀이 1 (완전탐색, for 문) function solution(word) { const str = ['','','','','']; const alphabet = ['A','E','I','O','U']; const n = 5; let cnt = 0; for(let i0=0; i0