From c78677fc54edb50937eaa382fc8ca5bb11fd30d9 Mon Sep 17 00:00:00 2001 From: ccconac Date: Tue, 4 Feb 2025 09:43:06 +0900 Subject: [PATCH] =?UTF-8?q?[43163]=20=EB=8B=A8=EC=96=B4=20=EB=B3=80?= =?UTF-8?q?=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- programmers/lv3/43163/ccconac.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/programmers/lv3/43163/ccconac.js b/programmers/lv3/43163/ccconac.js index d44155a..e39f6bc 100644 --- a/programmers/lv3/43163/ccconac.js +++ b/programmers/lv3/43163/ccconac.js @@ -2,11 +2,11 @@ function solution(begin, target, words) { const visited = []; const queue = []; - let changeCount = 0; + let answer = 0; if (!words.includes(target)) return 0; - queue.push([begin, changeCount]); + queue.push([begin, answer]); while (queue) { let [value, count] = queue.shift(); @@ -31,5 +31,5 @@ function solution(begin, target, words) { }); } - return changeCount; + return answer; }