Skip to content

Commit 9da39d8

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

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
@@ -13,7 +13,7 @@ class Solution {
1313
public:
1414
ListNode* oddEvenList(ListNode* head) {
1515
if (head) {
16-
for (ListNode *odd_tail = head, *cur = odd_tail->next;
16+
for (ListNode *odd_tail = head, *cur = head->next;
1717
cur && cur->next;
1818
cur = cur->next) {
1919

0 commit comments

Comments
 (0)