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 e0f04ba commit 9da39d8Copy full SHA for 9da39d8
1 file changed
C++/odd-even-linked-list.cpp
@@ -13,7 +13,7 @@ class Solution {
13
public:
14
ListNode* oddEvenList(ListNode* head) {
15
if (head) {
16
- for (ListNode *odd_tail = head, *cur = odd_tail->next;
+ for (ListNode *odd_tail = head, *cur = head->next;
17
cur && cur->next;
18
cur = cur->next) {
19
0 commit comments