Skip to content

Commit 462eb0d

Browse files
committed
Update Rotate List.cpp
1 parent f78cad2 commit 462eb0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rotate List.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Solution {
1818
++len;
1919
ptr=ptr->next;
2020
}
21-
if (!len)return head;
21+
if (!len)return head;//forgot to judge oringinal list is NULL
2222
k%=len;
2323
if (!k)return head;
2424
int c=len-k;

0 commit comments

Comments
 (0)