My solution has three parts.

Halve the list into two lists.

Reverse one of the sub lists.

Compare
bool isPalindrome(ListNode* head) { if(!head) return true; ListNode* slow = head; ListNode* fast = slow>next; // separate while(fast && fast>next && fast>next>next) { slow = slow>next; fast = fast>next>next; } ListNode* head2 = slow>next; slow>next = NULL; ListNode* prev = NULL; ListNode* cur = head2; ListNode* next = NULL; //reverse while(head2) { next = head2>next; head2>next = prev; prev = head2; head2 = next; } ///compare head2 = prev; while(head && head2) { if(head>val != head2>val) return false; head = head>next; head2 = head2>next; } return true; }