Skip to content

Commit 9c696d4

Browse files
committed
Update odd-even-linked-list.cpp
1 parent 9da39d8 commit 9c696d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

C++/odd-even-linked-list.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Solution {
2020
ListNode *even_head = odd_tail->next;
2121
odd_tail->next = cur->next;
2222
odd_tail = odd_tail->next;
23-
cur->next = cur->next->next;
23+
cur->next = odd_tail->next;
2424
odd_tail->next = even_head;
2525
}
2626
}

0 commit comments

Comments
 (0)