Skip to content

Commit acbbd84

Browse files
yoouyeonuyeon0
authored andcommitted
๐Ÿ’ก ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค 81303 - ํ‘œ ํŽธ์ง‘
cur ์กด์žฌ ์—ฌ๋ถ€ ํ™•์ธ ์กฐ๊ฑด ๋ช…ํ™•ํ•˜๊ฒŒ ์ˆ˜์ •
1 parent e9a7ef8 commit acbbd84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

โ€ŽProgrammers/Level3/81303_ํ‘œ_ํŽธ์ง‘.jsโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function solution3(n, k, cmd) {
4343
// ํ˜„์žฌ ์„ ํƒ๋œ ํ–‰์ด ๊ฐ€์žฅ ๋งˆ์ง€๋ง‰ ํ–‰์ธ ๊ฒฝ์šฐ ํ˜„์žฌ ํ–‰์„ ๊ทธ ์œ„ ํ–‰์œผ๋กœ
4444
if (row[cur].next === null) {
4545
cur = row[cur].prev;
46-
if (cur) row[cur].next = null;
46+
if (cur !== null) row[cur].next = null;
4747
} else {
4848
// ๊ทธ ์™ธ์—๋Š” ์•„๋ž˜ ํ–‰ ์„ ํƒ
4949
if (row[cur].prev !== null) row[row[cur].prev].next = row[cur].next;

0 commit comments

Comments
ย (0)