프로그래머스(C++) - 단어 변환
·
C++ 프로그래머스/BFS , DFS
●문제●입출력 문제해석 : 현재 begin의 단어가 words 안에서 target단어로 가는데 한번에 한 단어씩만 바꿔서 target으로 바뀌는 최소한의 변환절차를 카운팅 해서 returnbfs로 풀어도되고 dfs로 풀어도되는데 필자는 dfs로 풀었습니다#include #include #include using namespace std;int answer = 0;vector checked(51, 0); //방문여부void DFS(int count, const string& current, const string& target, const vector& words){ //다른 글자수 찾기 for (int i = 0; i words){ DFS(0, begin, target, words); return a..