반응형
코딩테스트연습
-
단어변환프로그래머스(Programmers) 2021. 11. 15. 23:28
입출력 예 begin target words return "hit" "cog" ["hot", "dot", "dog", "lot", "log", "cog"] 4 "hit" "cog" ["hot", "dot", "dog", "lot", "log"] 0 입출력 예 설명 예제 #1 문제에 나온 예와 같습니다. 예제 #2 target인 "cog"는 words 안에 없기 때문에 변환할 수 없습니다. #include #include #include #include using namespace std; vector wordCheck(51,false); vector wordsBook; int answer =100000; string targetWord; bool compare(string begin, string wor..