https://school.programmers.co.kr/learn/courses/30/lessons/84512
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
function solution(word) {
const res = {};
let idx = 0;
const alphabet = ['A', 'E', 'I', 'O', 'U'];
(dfs = (now, cnt) => {
if (cnt > 5) return;
res[now] = idx++;
if (now === word) return;
for (let i = 0; i < 5; ++i) {
next = now + alphabet[i];
dfs(next, cnt + 1);
}
})('', 0);
return res[word];
}
GitHub - developeSHG/Algorithm-Baekjoon_Programmers: 백준 and 프로그래머스 소스코드
백준 and 프로그래머스 소스코드. Contribute to developeSHG/Algorithm-Baekjoon_Programmers development by creating an account on GitHub.
github.com
'Coding Test > Programmers' 카테고리의 다른 글
[Programmers] (정렬) Lv 2. 가장 큰 수 (0) | 2023.02.23 |
---|---|
[Programmers] (완전탐색) Lv 2. 소수 찾기 (0) | 2023.02.23 |
[Programmers] (2022 KAKAO BLIND RECRUITMENT) Lv 2. 주차 요금 계산 (0) | 2023.02.22 |
[Programmers] (2018 KAKAO BLIND RECRUITMENT) Lv 2. [3차] n진수 게임 (0) | 2023.02.22 |
[Programmers] Lv 2. 할인 행사 (0) | 2023.02.20 |
댓글