We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9da39d8 commit 9c696d4Copy full SHA for 9c696d4
1 file changed
C++/odd-even-linked-list.cpp
@@ -20,7 +20,7 @@ class Solution {
20
ListNode *even_head = odd_tail->next;
21
odd_tail->next = cur->next;
22
odd_tail = odd_tail->next;
23
- cur->next = cur->next->next;
+ cur->next = odd_tail->next;
24
odd_tail->next = even_head;
25
}
26
0 commit comments